News for hackers. Stuff that matters.
Re:C and C++ Prioritize Performance over Correctness by StillBored on Friday August 18, 2023 @04:05PM (#37181353)
Agony might be a bit much, and i'm not trying to defend C because this is one of the strong reasons for using C++/STL...

But, generally one should just reach for a library first before doing a complex data structure regardless of language. And for example, the linux kernel does a fine job of doing some fairly complex data structures in a reusable way with little more than the macro processor and sometimes a support module. In a way the ease of writing linked lists/etc are why there are so many differing implementations. So, if your application is GPL, just steal the kernel functions, they are reasonably well optimized, and tend to be largely debugged, are standalone, etc.

There are no comments on this comment yet.