-
Notifications
You must be signed in to change notification settings - Fork 69
Scala
ninjudd edited this page Sep 8, 2012
·
3 revisions
To use drip with Scala, first you need to download Scala:
curl http://www.scala-lang.org/downloads/distrib/files/scala-2.9.2.tgz > scala-2.9.2.tgz
tar xzf scala-2.9.2.tgz
cd scala-2.9.2
Then set the JAVACMD
environment variable:
export JAVACMD=drip
Now you can run code like this:
bin/scala -e 'println(4 * 5 * 6 * 9)'
Or start a repl:
bin/scala
Drip cuts the startup time of Scala roughly in half. Not bad, but there is likely more optimization that can be done here. A better default value for DRIP_INIT
may help.
$ drip kill
$ time bin/scala -e 'println(4 * 5 * 6 * 9)' # 1080
real 0m1.091s
user 0m0.666s
sys 0m0.085s
$ time bin/scala -e 'println(4 * 5 * 6 * 9)' # 1080
real 0m0.498s
user 0m0.059s
sys 0m0.064s