4 ms·
It looks like a more complete breakdown is here. Crystal ranks just below Dart at 0.5413 (Dart was 0.5295). Luajit was 0.8056. I'm surprised Luajit does worse t
by suby 2y ago
It looks like a more complete breakdown is here. Crystal ranks just below Dart at 0.5413 (Dart was 0.5295). Luajit was 0.8056. I'm surprised Luajit does worse than Dart. Actually I am surprised Dart is beating out languages like C# too.
http://benjdd.com/languages2 http://benjdd.com/languages2
- igouy 2y agoMaybe that dozen lines of code isn't sufficient to characterize performance differences? Nearly 25 years ago, nested loops and fibs. https://web.archive.org/web/20010424150558/http://www.bagley.org/~doug/shootout/bench/nestedloop/ https://web.archive.org/web/20010424150558/http://www.bagley... https://web.archive.org/web/20010124092800/http://www.bagley.org/~doug/shootout/bench/fibo/ https://web.archive.org/web/20010124092800/http://www.bagley... It's been a long time since the benchmarks game showed those.
- saurik 2y agoDart's VM was designed by the team (I think not just the one guy, but maybe I'm wrong on that and it really is just Lars Bak) that designed most of the truly notable VMs that have ever existed: Self, Smalltalk Strongtalk, Java Hotspot, and JavaScript V8. It also features an ahead-of-time compiler mode in addition to a world-class JIT and interpreter, allowing for hot reload during development. https://en.m.wikipedia.org/wiki/Lars_Bak_(computer_programmer) https://en.m.wikipedia.org/wiki/Lars_Bak_(computer_programme... It was stuck with a bad rep for being the language that was never going to replace JavaScript in the browser, and then was merely a transpiler no one was going to use, before it found a new life as the language for Flutter, which has driven a lot of its syntax and semantics improvements since, with built-in VM support for extremely efficient object templating (used by the reactive UI framework).
- lern_too_spel 2y agoRuntime startup isn't amortized.
- igouy 2y agoHow do you know?
- lern_too_spel 2y agoThe methodology is documented in the link of the comment I responded to.
- igouy 2y agoPerhaps you mean that "the methodology" does not include an explicit step intended to amortize runtime startup. Perhaps the tiny tiny programs none-the-less took enough time that startup was amortized.
- neonsunset 2y agoThis nested loops microbenchmark only measures in-loop integer division optimizations on ARM64 - there are division fault handling differences which are ARM64 specific which introduce significant variance between compilers of comparable capability. On x86_64 I expect the numbers would have been much closer and within measurement error. The top half is within 0.5-0.59s - there really isn't much you can do inside such a loop, almost nothing happens there. As Isaac pointed out in a sibling comment - it's best to pick specific microbenchmarks, a selection of languages and implementations that interest you and dissect those - it will tell you much more.
- ModernMech 2y agoI wonder why C++ isn't in that list but a bunch of languages no one uses are.