News for hackers. Stuff that matters.
Re:PyPy 1.5 Released: Catching Up by kragen on Saturday April 30, 2011 @08:42PM (#2501983)
Last I heard, no JS engine was close to LuaJIT's performance; they were all worse by a factor of five or so. Clojure being in the LuaJIT ballpark would surprise me (do you have benchmarks?) but Racket wouldn't. (But I wouldn't call Scheme a dynamic language!)
Re:PyPy 1.5 Released: Catching Up by swannodette on Sunday May 01, 2011 @12:58PM (#2503377)
http://shootout.alioth.debian.org/u64/which-language-is-best...

Clojure 1.2.0 is already faster than Racket. Version 1.3.0 will probably bring it close to Go territory on those benchmarks.

For my own work I've found that getting Clojure in the Java ballpark is certainly possible.

Re:PyPy 1.5 Released: Catching Up by igouy on Sunday May 01, 2011 @09:06PM (#2504570)
Re:PyPy 1.5 Released: Catching Up by kragen on Monday May 02, 2011 @01:57PM (#2507178)
Re:PyPy 1.5 Released: Catching Up by kragen on Sunday May 01, 2011 @01:58PM (#2503567)
You're right; it looks like Racket is not in the C/LuaJIT ballpark, either. It's too bad the LuaJIT results are no longer on the web site.
Re:PyPy 1.5 Released: Catching Up by swannodette on Sunday May 01, 2011 @03:46PM (#2503850)
Last Alioth results I saw LuaJIT was slower than Java, and certainly not in the C ballpark at all.
Re:PyPy 1.5 Released: Catching Up by kragen on Sunday May 01, 2011 @05:57PM (#2504190)
http://lua-users.org/lists/lua-l/2009-10/msg01098.html shows LuaJIT beating GCC 4.3.2 on some parts of SciMark, and no more than 3× worse on any part. I'm importing the shootout CVS repository into Git, so hopefully we can make some more definitive comparisons soon.
Re:PyPy 1.5 Released: Catching Up by mikemike on Tuesday May 03, 2011 @05:14AM (#2509420)
That post is ancient ... here are newer SciMark results for LuaJIT:

http://lua-users.org/lists/lua-l/2010-12/msg00924.html

Re:PyPy 1.5 Released: Catching Up by kragen on Tuesday May 03, 2011 @06:15PM (#2511859)
Thank you very much! Looks like LuaJIT's beating GCC on almost everything now, and the JVM on most things. But that's with LuaJIT-specialized code that won't run on Lua, which is a little less exciting.
Re:PyPy 1.5 Released: Catching Up by swannodette on Sunday May 01, 2011 @07:34PM (#2504395)
Those overall results show that LuaJIT doesn't really compete much the JVM running under server mode.
Re:PyPy 1.5 Released: Catching Up by kragen on Monday May 02, 2011 @12:10AM (#2505056)
On the contrary, although the JVM is always faster, LuaJIT is within about 15% of it on SOR, and never worse by even a factor of 2.
Re:PyPy 1.5 Released: Catching Up by euccastro on Saturday April 30, 2011 @09:26PM (#2502048)
> But I wouldn't call Scheme a dynamic language!

Care to elaborate?

Re:PyPy 1.5 Released: Catching Up by kragen on Sunday May 01, 2011 @03:18AM (#2502583)
Scheme operations are mostly early-bound, even more so than Common Lisp; you standardly use vector-ref or string-ref, for example, instead of nth. (There are Schemes where this is not true, such as RScheme, but Racket is not among them.) Vectors aren't resizable; for that kind of thing, you must use lists. You can't attach arbitrary properties to some arbitrary object, the way you can in JS or Ruby. You can't introduce new variable bindings in the middle of a block. (What you do instead is make a new nested block.) Finite maps (assoc, make-hash-table) are second-class citizens. Standard Scheme is nonreflective; you're supposed to do your metaprogramming with macros, not reflection and interposition. (I don't know how much reflection Racket supports, but I'd guess almost none.) The object-literal syntax is quasiquote, which is clumsy.

It does have dynamic typing, but that's not what it means to be a "dynamic language". Dynamic languages are late-bound; everything is up for grabs at runtime. In standard Scheme, this is true in the fairly useless sense that everything depends on the bindings in the global namespace, so you could in theory (set! car somethingweird), but this is very rarely practical; it almost serves only to make optimizing Scheme compilers difficult to write. Aside from that, the language leans much further toward early binding, doing things at compile-time, and using efficient data structures at the cost of flexibility.

Re:PyPy 1.5 Released: Catching Up by euccastro on Sunday May 01, 2011 @04:09PM (#2503934)
I don't think the meaning you give to "dynamic" here has much bearing on the difficulty of just-in-time compilation, except for reflection.

In Scheme you can define and create new functions and macros at runtime. There is not much else that is dynamic about the Scheme standard[1] because... there's not much else to the Scheme standard.

As for reflection, I see that mainly as a tools/debugging aid, and therefore very implementation-specific stuff. "Dynamic" languages have reflection in their definition because they are mostly defined by implementation.

That said, the Scheme standard doesn't preclude reflectivity at all, nor seems particularly compile-oriented to me. Nowhere it is assumed that implementations be compilers at all.

I think most of the things you find missing there were not left out for efficiency, but because it was rightly considered that they don't belong in the language spec at all.

[1] By the "Scheme standard" I mean R5RS.

Re:PyPy 1.5 Released: Catching Up by kragen on Sunday May 01, 2011 @05:29PM (#2504137)
I agree, none of these features have much to do with the difficulty of just-in-time compilation. The stellar performance results Mike Pall is getting with LuaJIT, which has all of those features, kind of prove that. They do, however, have a lot to do with the usability and dynamic feeling of a language. This makes their absence from most Schemes less understandable.

> As for reflection, I see that mainly as a tools/debugging aid

You can use it that way, but you can also use it for metaprogramming.

> "Dynamic" languages have reflection in their definition because they are mostly defined by implementation.

Plausible.

> That said, the Scheme standard doesn't preclude reflectivity at all, nor seems particularly compile-oriented to me. Nowhere it is assumed that implementations be compilers at all.

True.

Re:PyPy 1.5 Released: Catching Up by swannodette on Sunday May 01, 2011 @01:02PM (#2503392)
Most of the things you've said I imagine don't apply to Racket, I didn't say anything about Scheme in my original post.
Re:PyPy 1.5 Released: Catching Up by kragen on Sunday May 01, 2011 @01:59PM (#2503572)
Well, I imagine they do, but I'd be interested in finding out whether my imagination is misleading me. Which things I said don't apply?
Re:PyPy 1.5 Released: Catching Up by justincormack on Sunday May 01, 2011 @06:24AM (#2502805)
Indeed. The LuaJIT interpreter with JIT disabled is a similar speed to V8 in most benchmarks.