News for hackers. Stuff that matters.
Re:Dart team posts an example of fast code with 22ms for a “... by slezyr on Thursday May 07, 2020 @03:44PM (#23107333)
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.

Re:Dart team posts an example of fast code with 22ms for a “... by plerpin on Thursday May 07, 2020 @10:09PM (#23110663)
Yup. 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!

Re:Dart team posts an example of fast code with 22ms for a “... by moonchild on Thursday May 07, 2020 @03:53PM (#23107441)
Probably 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.
Re:Dart team posts an example of fast code with 22ms for a “... by tomtomtom1 on Thursday May 07, 2020 @04:35PM (#23107976)
would ios_base::sync_with_stdio(false); also help?
Re:Dart team posts an example of fast code with 22ms for a “... by moonchild on Thursday May 07, 2020 @07:42PM (#23109704)
In my benchmark, the c++ version uses the c api (printf rather than cout), so it wouldn't make a difference.