Re:C and C++ Prioritize Performance over Correctness
by NavinF on Friday August 18, 2023 @04:08PM
(#37181401)
That must be why every C project has its own string, dynamic array, hashtable, etc. It's definitely more performant to have several different implementations of the same thing fighting for icache
[ Parent
| on HN ]
Re:C and C++ Prioritize Performance over Correctness
by overgard on Friday August 18, 2023 @04:42PM
(#37181832)
To be fair, most C++ projects (outside of embedded and games) use STL for string/dynamic array/hashtable, and while that standardization is certainly convenient I'm not sure STL is generally faster than most hand written C data structures, even with the duplicated code.
Re:C and C++ Prioritize Performance over Correctness
by commonlisp94 on Friday August 18, 2023 @05:04PM
(#37182079)
It's a nice thought, but in practice C binaries are orders of magnitude smaller than any other language. Also compilers make that tradeoff for inlining all the time.