5 ms·
Definitely. Just find a use case where you need the performance
by simonhfrost 1y ago
Definitely. Just find a use case where you need the performance
- wruza 1y agoWhy do you focus on "performance" here?
- pineaux 1y agoPresumably because C = performance? Although I think it really depends on how you structure your program.
- tialaramex 1y agoYeah. Many reasons your program might be too big or too slow still apply to C.
- pjmlp 1y agoIndeed, a programming language can't do wonders when the authors did not pay attention to algorithms and data structures.
- saagarjha 1y agoThere is basically no real reason to write an iOS app in C. It won’t perform significantly better.
- flohofwoe 1y agoIt really depends on how much ObjC features you use in the performance-sensitive parts of your code base. If you build your entire code around the ObjC object model and not just the parts that talk to operating system APIs you might see a performance hit since ObjC method calls are simply more expensive than a direct C function call (especially since C function calls can often be inlined)., and even setting or getting an ObjC object property involves a method call. But since ObjC is also a complete C there's really no point in using more ObjC OOP features than really needed (e.g. just for talking to iOS/macOS framework APIs).
- wruza 1y agohttps://www.mikeash.com/pyblog/performance-comparisons-of-common-operations-leopard-edition.html https://www.mikeash.com/pyblog/performance-comparisons-of-co...
- flohofwoe 1y agoSince ObjC(++) is a true superset of C (or C++), you can just write the performance-sensitive parts in C or C++ anyway. ObjC is only needed when talking to (most) macOS/iOS operating system APIs.