3 ms·
That's like saying that ruby is probably as fast as c because the interpreter is written in c. http://tinyurl.com/daom93 http://tinyurl.com/daom93 - shootout n
by sharkbrainguy 18y ago
That's like saying that ruby is probably as fast as c because the interpreter is written in c.
http://tinyurl.com/daom93 http://tinyurl.com/daom93 - shootout numbers rhino v. java
- jamesbritt 18y ago"That's like saying that ruby is probably as fast as c because the interpreter is written in c." I was under the impression that Rhino was doing some compiling to byte-code (unlike what MRI does, but what perhaps like JRuby does). Live and learn.
- jamesbritt 18y agoWTF is with modding people down for saying they took a guess, were wrong, and now learned something? Does that in any way add to the discussion?
- richcollins 18y agoThou shalt not mock Lisp or be in any way associated with one who does: http://news.ycombinator.com/item?id=545859 http://news.ycombinator.com/item?id=545859 http://news.ycombinator.com/item?id=545851 http://news.ycombinator.com/item?id=545851
- jamesbritt 18y agoSpeculation on the behavior of Rhino equals mocking Lisp? Wow; who knew?
- icey 18y agoYeah, I noticed that as well... Kind of bizarre. Especially since Rhino was a pretty good educated guess; I went and took a look at it as well since I know there are some pretty performant languages running on the JVM that aren't Java. For whatever it's worth, I think the problem Javascript is going to have with speed is that it is so dynamic that it makes it difficult for compilers to optimize. If it ever got type hints it would probably be much easier to make fast.
- sharkbrainguy 18y agoSorry that sounded as snarky as it obviously did. I thought I was just drawing an analogy. Anyways... The semantics of javascript are so different to Java (javascript functions are not like java functions everything is dynamic etc.) that you can't really expect the performance of javascript code to be comparable to Java just because it's hosted on the JVM, even if it did compile to Java byte code. The Javascript equivalent would have to do so much more work than the Java version to support all the crazy crap you can do in javascript (ad hoc adding of properties to almost any object at any time).
- jamesbritt 18y agoThanks for the clarification.