3 ms·
I thought the C++ tendency was to optimize performance sensitive parts with C or assembly.
by Kye 5y ago
I thought the C++ tendency was to optimize performance sensitive parts with C or assembly.
- taylodl 5y agoC++ is C. We used to optimize with assembly but nowadays with a processor's superpipelined architecture and the compiler's global register optimizations and so forth your inlined assembly is more likely to throw a monkey wrench into the whole works and make everything run slower. It's a better use of your time to look for a better algorithm.
- khoobid_shoma 5y agoNot really. C++ is not C, nor faster than C. e.g. TCO in C++ is awful due to ctor/dtor (could be mitigated by some compiler hints if available).