News for hackers. Stuff that matters.
Re:ClojureScript and optimized C [video] by sooheon on Monday November 28, 2016 @01:40PM (#13057421)
So Javascript compilers are faster than Java now?
Re:ClojureScript and optimized C [video] by sdegutis on Monday November 28, 2016 @01:48PM (#13057478)
Not really.

The code in question:

    (apply + (range 1e7))
is just summing a bunch of numbers. That's it. It's very easy to optimize for the sake of benchmarks.

It's way too trivial to use for any kind of meaningful real-world comparison.

Re:ClojureScript and optimized C [video] by bad_user on Monday November 28, 2016 @05:23PM (#13058945)
I'm working on a cross-compiled library and I am able to compare the same code compiled for the JVM and for Javascript, the language used being Scala, which targets the JVM as a primary target and now we also have http://scala-js.org which is quite good btw.

I can tell you that the answer is definitely no, in my tests V8 being slower than the JVM by a factor ranging between 4 and 10.

If you're interested in seeing that in action, you can download the library's source code and run its tests for the JVM and see how that feels in comparison with the same tests being executed for JS. See: https://github.com/monix/monix