remi_forax
Now, the main point of this toy language as you call it is to demonstrate that a dynamic language can be fast if you don't design it with an interpreter in mind. BTW, I really hope that this is what Dart is.
Rémi
Rémi
That's why I think I own the right to call this language PHP.reboot.
Rémi
The language is tailored unlike any dynamic languages. Instead of adding features and wondering how to optimize them after, I have worked backward and carefully pick/design features only if I was able to optimize it to be at least as fast as Java.
The hidden jewel of PHP.reboot is its runtime which first interpret the script and then use a type inference/type checker algorithm to try to emit exactly the same bytecode as javac. So some parts of the language are quite fast, but not the whole language because some parts still run in interpreted mode only.
As a demo, I've taken the mandelbrot benchmark from the Computer Language benchmark[1] and write it in PHP.reboot (I hope with no mistake). Here is the result on my laptop:
[forax@localhost phpreboot]$ time bin/phpr.sh test/mandelbrot.phpr >/dev/null
real 0m34.189s user 0m34.087s sys 0m0.088s
You can compare with your favourite dynamic language :)
cheers, Rémi
[1] http://shootout.alioth.debian.org/u64/performance.php?test=m...