Re:Dart team posts an example of fast code with 22ms for a “...
by timsneath on Thursday May 07, 2020 @05:08PM
(#23108354)
Here are a few comparisons (13" MBP, YMMV).
[ Parent
| on HN ]
Re:Dart team posts an example of fast code with 22ms for a “...
by vips7L on Thursday May 07, 2020 @06:42PM
(#23109222)
Which JDK? OpenJDK 14 on my machine:
~> Measure-Command { java Main }
Milliseconds : 59
Re:Dart team posts an example of fast code with 22ms for a “...
by Delk on Saturday May 09, 2020 @12:42PM
(#23126191)
I got:
OpenJDK 8: ~80-90 ms
OpenJDK 11: ~60 ms
OpenJDK 14: ~50-55 ms
The first runs were a bit slower, perhaps because the files needed by the JVM weren't in disk cache or something.
Other languages/runtimes:
Python 2.7: 20-25 ms
Python 3.8: 30-40 ms
Native binary compiled from C: 1-3 ms (so bordering on unmeasurable at millisecond resolution)
This was on Linux, and an entirely unrigorous experiment.
edit: formatting