[go: up one dir, main page]

|
|
Log in / Subscribe / Register

DNF 3: better performance and a move to C++

DNF 3: better performance and a move to C++

Posted Apr 7, 2018 9:57 UTC (Sat) by HelloWorld (guest, #56129)
In reply to: DNF 3: better performance and a move to C++ by HenrikH
Parent article: DNF 3: better performance and a move to C++

Templates will generate code specialized for different types which can speed things up immensely. Try sorting a list of doubles with std::sort and qsort. The latter will be slower.

There's also a more subtle reason: C++ allows you to abstract over things that C doesn't, hence allowing better code re-use. And you're more likely to use good algorithms and data structures if somebody else built them generically and put them into an easy-to-use library than if you have to build them yourself.


to post comments


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds