Re:Dart team posts an example of fast code with 22ms for a “...
by hedora on Thursday May 07, 2020 @08:39PM
(#23110092)
Poking around on my laptop, dash and perl take about 2ms. Python takes 12.
Anyway, the modern c++ I use avoids allocations like the plague.
I subscribe to the idea that C++ is a language for standard library implementors, and that std:: is mostly placeholders for the “real” implementation you’ll use later.
To be fair, I presume that the included runtime is written in C++, and modern C++ coding styles are pretty inefficient. Lots of small, dynamic allocations. Too much of the wrong kinds of abstraction. It's what happens when you shoehorn problems into established solution models, rather than approach development, including boiler plate code, as crafting a bespoke solution model fit to the problem. But the latter makes onboarding new engineers more difficult--you can't start hacking without first grasping the larger architecture--and therefore frowned upon in larger companies, or in small companies that equivocate big company approaches to "best practice".