Voloda2
Voloda2

Reputation: 12607

Are C functions slower in .m files than in the .c files?

Are C functions slower in .m files than in the .c files? Does someone know any performance tests?

Upvotes: 0

Views: 629

Answers (2)

CodaFi
CodaFi

Reputation: 43330

Are C functions slower in .m files than in the .c files? Does someone know any performance tests?

Well, let me sort of interpret your question to mean "Are C-functions slower or faster than Objc-Messages?" And the answer is....

It depends. Mike Ash does a great speed comparison between ObjC and C++ and C here.

Upvotes: 2

Eregrith
Eregrith

Reputation: 4366

Files are not fast or slow. They are compiled, and linked in a binary. I assume you are asking about the speed of an executable compiled from such files.

The problem is, then, the compiler. If you compile your code from the .c files with the same compiler than the .m files, and it is optimised, the result will be the same.

Upvotes: 7

Related Questions