DNF 3: better performance and a move to C++
DNF 3: better performance and a move to C++
Posted Mar 29, 2018 17:01 UTC (Thu) by rahulsundaram (subscriber, #21946)In reply to: DNF 3: better performance and a move to C++ by antiphase
Parent article: DNF 3: better performance and a move to C++
Moving from C to C++ can and does fix a number of bugs, improve security and performance. Many projects including say GCC has done it for similar reasons.
> think how much benefit people will see from being able to install more packages per second.
People do benefit from faster installations and upgrades.
Posted Mar 31, 2018 0:21 UTC (Sat)
by Twirrim (subscriber, #122505)
[Link] (1 responses)
I'd be really curious where shaving a few seconds off on package upgrades or installations is that advantageous. Yes speeding up yum is a nicer user experience, but this seems to be well into the territory of diminishing returns.
Posted Mar 31, 2018 2:16 UTC (Sat)
by rahulsundaram (subscriber, #21946)
[Link]
Two major places atleast, initial installation and full release upgrades. Anaconda, the Fedora installer doesn't support upgrades anymore. It is all handled through the dnf system upgrade plugin and for each of these use cases, the performance differences are substantial.
There are plenty of other places including package builds in the buildsystem or QA test systems which are done in a clean chroot, where a few seconds can add up over time.
Posted Mar 31, 2018 17:41 UTC (Sat)
by HenrikH (subscriber, #31152)
[Link] (6 responses)
Posted Mar 31, 2018 18:07 UTC (Sat)
by rahulsundaram (subscriber, #21946)
[Link] (4 responses)
It certainly can but I think you are mixing up two things. Read the announcement linked in the article. Dnf 3 includes both performance work and a move from C to C++. They are not necessarily related.
Posted Mar 31, 2018 18:23 UTC (Sat)
by rahulsundaram (subscriber, #21946)
[Link] (2 responses)
http://benchmarksgame.alioth.debian.org/u64q/cpp.html
It is not uniformally better but a lot of C programs end up duplicating parts of C++ poorly. A move to C++ can help in such circumstances.
Posted Apr 1, 2018 17:05 UTC (Sun)
by HenrikH (subscriber, #31152)
[Link] (1 responses)
Posted Apr 2, 2018 13:24 UTC (Mon)
by ncm (guest, #165)
[Link]
That power includes application of algorithms that are too finicky to code for just one use; performance tuning, likewise; and data structures, again. C has inlining now, but C++ is able to make much more effective use of it, and the optimizers understand that use, so can squeeze out what used to be called "abstraction overhead" (when there usually was some).
Furthermore: because it is easier to work with values directly in C++, rather than by reference, the optimizer has more to work with, not bothered by potential aliasing.
Posted Apr 1, 2018 16:58 UTC (Sun)
by HenrikH (subscriber, #31152)
[Link]
Posted Apr 7, 2018 9:57 UTC (Sat)
by HelloWorld (guest, #56129)
[Link]
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.
DNF 3: better performance and a move to C++
DNF 3: better performance and a move to C++
DNF 3: better performance and a move to C++
DNF 3: better performance and a move to C++
DNF 3: better performance and a move to C++
DNF 3: better performance and a move to C++
DNF 3: better performance and a move to C++
DNF 3: better performance and a move to C++
DNF 3: better performance and a move to C++