News for hackers. Stuff that matters.
Re:Benchmark: Java, Python, PHP, C, JavaScript, Swift, Ruby,... by dpratt on Sunday June 04, 2017 @12:10AM (#14479842)
Any benchmark that includes a JVM language always makes me look for a disclaimer that they allowed for proper JIT/warming time by running the benchmark a few times in the same VM instance before collecting the numbers. I may have missed it in this article, but I didn't see it.

Yes, startup time is a concern with the JVM, but that's not what it's built for - it's meant for long-runnning repeatable code paths.

Re:Benchmark: Java, Python, PHP, C, JavaScript, Swift, Ruby,... by mpweiher on Sunday June 04, 2017 @02:57AM (#14480214)
> that's not what it's built for

There was nothing in the original design that said "only long running server processes". In fact, Java was originally aimed at set-top boxes, then web applets, then cross platform GUI apps. It was only after it failed in all of these that the server was discovered, despite the fact that "write once, run anywhere" is almost completely pointless when you control the hardware it runs on.

The long startup times are a limitation of the implementation technology, not a principled design choice. See also: Jitterdämmerung ( http://blog.metaobject.com/2015/10/jitterdammerung.html )

Re:Benchmark: Java, Python, PHP, C, JavaScript, Swift, Ruby,... by igouy on Sunday June 04, 2017 @01:23PM (#14482470)
Any comments that "startup time is a concern with the JVM" always make me look for evidence that the person has made some attempt to investigate startup time for the specific circumstances they discuss.

http://benchmarksgame.alioth.debian.org/sometimes-people-jus...

Re:Benchmark: Java, Python, PHP, C, JavaScript, Swift, Ruby,... by alayne on Sunday June 04, 2017 @02:47AM (#14480190)
He doesn't do warmups for JITted languages.
Re:Benchmark: Java, Python, PHP, C, JavaScript, Swift, Ruby,... by peterashford on Monday June 05, 2017 @10:39PM (#14494293)
...which means the measurements are meaningless. They will include the time to analyse the hot paths and then compile them.
Re:Benchmark: Java, Python, PHP, C, JavaScript, Swift, Ruby,... by igouy on Monday June 05, 2017 @11:25PM (#14494515)
They will include a few tenths of a second.

Note the timings are seconds and tens-of-seconds.

Re:Benchmark: Java, Python, PHP, C, JavaScript, Swift, Ruby,... by Safety1stClyde on Sunday June 04, 2017 @12:14AM (#14479851)
A program written in C will execute faster if you run it multiple times, and slower if it has not been run recently. Presumably all of the benchmarks consist of many thousands of repetitions of the same process.
Re:Benchmark: Java, Python, PHP, C, JavaScript, Swift, Ruby,... by azinman2 on Sunday June 04, 2017 @01:01AM (#14479968)
The difference is not as dramatic as with the JVM.
Re:Benchmark: Java, Python, PHP, C, JavaScript, Swift, Ruby,... by igouy on Sunday June 04, 2017 @01:52PM (#14482595)
The difference is not as dramatic with tiny tiny programs that run for more than a few tenths of a second.
Re:Benchmark: Java, Python, PHP, C, JavaScript, Swift, Ruby,... by peterashford on Monday June 05, 2017 @10:41PM (#14494301)
Oh, yes it is. I've benchmarked code I've written in C++ vs Java before and allowing hotspot to optimise the code makes a huge difference
Re:Benchmark: Java, Python, PHP, C, JavaScript, Swift, Ruby,... by igouy on Wednesday June 07, 2017 @02:19AM (#14504107)
How "huge" on a 20 second run of nbody 50000000 ?

http://benchmarksgame.alioth.debian.org/u64q/program.php?tes...

The measurement shown is 21.54 secs.

The average JMH shows is 23.367 ± 0.062.