Gravel Smalltalk requires maven and an (Oracle|OpenJDK) Java 7 installation. Generate an eclipse project with the usual
What is Gravel
Gravel is a modern Smalltalk implementation for the JVM. It's aim is to provide an interactive development environment in the Smalltalk philosophy as well as a stable and fast runtime platform. Gravel aims to be fully ANSI Smalltalk compatible.
The parser and patching-compiler of Gravel is written in Smalltalk with Type annotations. These type annotations allow these parts of gravel to be transformed to Java source code. The runtime system then uses this compiler to generate bytecode. It uses the JSR-292 invokedynamic facilities.
- Optional typing
- Patching compiler
- Full block closures
- Resumable exceptions
- Mirror based reflection facilities
Common Smalltalk features that we probably won't support
Some preliminary benchmark results of running DeltaBlue>>longBenchmark for five iterations on my Intel(R) Xeon(R) CPU E31270 @ 3.40GHz. The good stuff:
Duration: 2030 ms Duration: 2012 ms Duration: 1996 ms Duration: 2042 ms Duration: 2057 ms
Reference Smalltalk Implementation in Gravel:
Duration: 3651 ms Duration: 1420 ms Duration: 1311 ms Duration: 1376 ms Duration: 1304 ms
As we can see after the first iteration the hotspot compiler kicks.
The bad: Gravel isn't at its best with the Richards benchmark. To compare Java with Gravel:
Duration: 28 ms Duration: 8 ms Duration: 8 ms Duration: 7 ms Duration: 7 ms
100 iterations run in: 1937 ms 100 iterations run in: 1280 ms 100 iterations run in: 1272 ms 100 iterations run in: 1295 ms 100 iterations run in: 1278 ms