News for hackers. Stuff that matters.
Re:Lua vs Ruby benchmarks (similarly "high-level" languages,... by Zak on Friday January 30, 2009 @04:26PM (#458719)
Without some discussion of why Lua is faster, this isn't very interesting. Lua is known for being small and fast, so this benchmark shouldn't be news to most people here.

SBCL is faster still, averaging about half the speed of GCC and about the same as Java.

Re:Lua vs Ruby benchmarks (similarly "high-level" languages,... by silentbicycle on Saturday January 31, 2009 @09:27AM (#459578)
The first place to look is probably "The Implementation of Lua 5.0" (http://www.tecgraf.puc-rio.br/~lhf/ftp/doc/sblp2005.pdf).

Short paper, but very interesting.

The LPEG paper (http://www.inf.puc-rio.br/~roberto/docs/peg.pdf) is great, too.

Re:Lua vs Ruby benchmarks (similarly "high-level" languages,... by LogicHoleFlaw on Saturday January 31, 2009 @12:31PM (#459798)
The "History of Lua" paper written a few years ago for a presentation at HOPL is also great reading and gives good insight into why Lua is the way it is.

http://www.tecgraf.puc-rio.br/~lhf/ftp/doc/hopl.pdf

Re:Lua vs Ruby benchmarks (similarly "high-level" languages,... by JulianMorrison on Saturday January 31, 2009 @10:31AM (#459693)
The important difference is memory. It's generally possible to trade space for speed in a JIT and accelerate anything. SBCL is lisp with a JIT. It's as fast as Java - it's as fat as Java (to within 5x either way). Lua is both small and fast, and is more or less on its own as an interpreted language in that category. (Forth is smaller and faster, but forth is about as low level as macro assembler.)
Re:Lua vs Ruby benchmarks (similarly "high-level" languages,... by critic on Friday January 30, 2009 @08:13PM (#459055)
SBCL is not as "high-level", especially when you are aiming for speed. Yossi already wrote about this http://www.yosefk.com/blog/the-high-level-cpu-challenge.html , so there is no need for me to do it:

    If you use Lisp’s static annotation 
    system, your code becomes uglier than 
    Java, and much less safe (I don’t think 
    Lisp does static checking of parameter 
    types, it just goes ahead and passes you 
    an object and lets you think it’s an integer).
Additionally, Lua only has "one data structure type" - that's also "higher-level" than what you have to do in Lisp, deciding among singly-linked lists, arrays, hash tables, binary trees, lexical trees, etc.

So while SBCL has its place, there's something about Lua you have to admire, don't you think?

Re:Lua vs Ruby benchmarks (similarly "high-level" languages,... by jbjohns on Saturday January 31, 2009 @04:39AM (#459424)
SBCL actually does a lot of inferred type checking when type declarations are present.