News for hackers. Stuff that matters.
Re:Are Google employees being discouraged from using Python ... by rbranson on Tuesday November 10, 2009 @02:47PM (#933788)
V8 is very impressive. It is one of the fastest virtual machines for dynamic languages. Look where it scores on the shootout.

http://shootout.alioth.debian.org/u32/benchmark.php?test=all...

It is nearly 10x faster than Ruby 1.8 and 5x faster than CPython. Of the shootout, it is the fastest dynamically typed language other than LuaJIT.

Re:Are Google employees being discouraged from using Python ... by igouy on Tuesday November 10, 2009 @10:06PM (#934504)
> the fastest dynamically typed language other than

You could select just those languages...

http://shootout.alioth.debian.org/u32/benchmark.php?test=all...

Re:Are Google employees being discouraged from using Python ... by swolchok on Tuesday November 10, 2009 @03:49PM (#933909)
That surprises me. Doesn't LuaJIT simply spit out subroutine-threaded code?
Re:Are Google employees being discouraged from using Python ... by whye on Tuesday November 10, 2009 @04:03PM (#933934)
No. It is much, much more sophisticated than that. See this message by Mike Pall, LuaJIT's author for the details:

http://article.gmane.org/gmane.comp.lang.lua.general/58908

Re:Are Google employees being discouraged from using Python ... by Tichy on Wednesday November 11, 2009 @08:07AM (#935160)
That's one badass post.
Re:Are Google employees being discouraged from using Python ... by jrockway on Tuesday November 10, 2009 @04:12PM (#933954)
Uh, SBCL is dynamically-typed.
Re:Are Google employees being discouraged from using Python ... by mhd on Tuesday November 10, 2009 @06:13PM (#934162)
Well, the shootout entries generally blur the line, using lots of type declarations.
Re:Are Google employees being discouraged from using Python ... by bad_user on Wednesday November 11, 2009 @03:50AM (#934923)
The SBCL tests submitted to the shootout are using type annotations heavily.

In that test it doesn't count as a dynamic-typed language.

Re:Are Google employees being discouraged from using Python ... by jrockway on Wednesday November 11, 2009 @04:08PM (#936236)
So is C dynamically typed when it converts an integer to a pointer?
Re:Are Google employees being discouraged from using Python ... by bad_user on Thursday November 12, 2009 @04:57AM (#937448)
No, that's called loosely typed.

Having type annotations is a big deal because you can infer certain things at compile time.

Take for instance (+ x y). In CLisp "+" is a multi-method, the dispatch being done at runtime, but if you know that x and y are both integers, there's no need to search the right method to call at runtime, its address is already known. And then you can also decide to inline its code at compile-time if there aren't any conflicts (mostly like a macro, but without the laziness).

Of course, in dynamically-typed languages you have the freedom to infer these things at runtime, in certain situations you can infer the types of "x" and "y", you can use a cache for the call sites, and so on, but it's a lot more complicated, and one of the reasons is that for every optimization you do, you have to be ready to de-optimize when the assumptions have been invalidated.

That's why I said SBCL doesn't count as being dynamic in that test because it probably makes full use of those static annotations.