3 ms·
It's a startup time of the runtime. More interested in results with two "hello,world"s. How much the next one going to cost. Also C++ with cout, -O3 is 4ms and
by slezyr 6y ago
It's a startup time of the runtime. More interested in results with two "hello,world"s. How much the next one going to cost.
Also C++ with cout, -O3 is 4ms and one in *.Zig is 1ms for some reason.
- moonchild 6y agoProbably want -Os (and strip afterwards) if you're interested in startup time. C is also 1ms. C++ has a big cxxrt that zig doesn't. FWIW c++ only takes 2ms on my (quite slow) machine.
- tomtomtom1 6y agowould ios_base::sync_with_stdio(false); also help?
- moonchild 6y agoIn my benchmark, the c++ version uses the c api (printf rather than cout), so it wouldn't make a difference.
- plerpin 6y agoYup. Dart has a runtime. Runtimes have to spin up when they're run cold. But we shouldn't let facts get in the way of a good Hackernews hivemind dogpile. Dart bad!