This page is no longer maintained — Please continue to the home page at www.scala-lang.org

REPL startup: the phillips commission report

2 replies
extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.

Scala version: 2.9.0.r23890

Command template, an accurate proxy for repl startup time:
% JAVA_OPTS="$JAVAOPTS" time scala $SCALAOPTS -nocompdaemon -e '5*5'

$JAVAOPTS is some combination of -d32/-d64 and -client/-server
$SCALAOPTS is --usebootcp or ""

Option --usebootcp places the scala jars on the boot classpath, where
the TSA ushers them through without bothering to verify the absence of
malicious intent. Times were collected in bunches, but they were plenty
stable so the reported times are single representative runs. All
collected on my macbook pro.

[1] OSX Java SE (build 1.6.0_22-b04-307-10M3261)
[2] OpenJDK 32-bit (build 1.7.0-internal-henri_2010_12_01_00_46-b00)
[3] OpenJDK 64-Bit (build 1.7.0-internal-henri_2010_12_01_00_49-b00)

(For [2] and [3] see http://code.google.com/p/openjdk-osx-build/ )

JVM | 32/64 | c/s | bootcp | startup time
-------------------------------------------
[1] -d32 -client --usebootcp | 2.56 real 3.10 user 0.20 sys
[1] -d32 -client | 3.22 real 3.86 user 0.21 sys
[1] -d32 -server --usebootcp | 3.70 real 7.40 user 0.29 sys
[1] -d32 -server | 4.57 real 9.04 user 0.33 sys
[1] -d64 -server --usebootcp | 3.72 real 7.31 user 0.41 sys
[1] -d64 -server | 4.52 real 8.68 user 0.44 sys
[2] -d32 -client --usebootcp | 2.31 real 2.57 user 0.14 sys
[2] -d32 -client | 3.13 real 3.40 user 0.15 sys
[2] -d32 -server --usebootcp | 3.53 real 6.87 user 0.20 sys
[2] -d32 -server | 4.58 real 8.49 user 0.23 sys
[3] -d64 -server --usebootcp | 3.46 real 7.03 user 0.35 sys
[3] -d64 -server | 4.36 real 8.42 user 0.36 sys

TL/DR:
1) --usebootcp drops 0.8-1.0 seconds off startup.
2) -client drops about 1.5 seconds compared to -server.
3) 64bit is not slower than 32bit when comparing -server vs. -server.
4) OpenJDK is faster than 1.6.0_22 at starting scala repls.

Observation: --usebootcp should be the default, and --nobootcp the option.

Randall R Schulz
Joined: 2008-12-16,
User offline. Last seen 1 year 29 weeks ago.
Re: REPL startup: the phillips commission report

PaulP contains multitudes. Or a commission, at least.

RRS

dcsobral
Joined: 2009-04-23,
User offline. Last seen 38 weeks 5 days ago.
Re: REPL startup: the phillips commission report
I would what flatMap on PaulP would do.

On Thu, Jan 6, 2011 at 13:15, Randall R Schulz <rschulz@sonic.net> wrote:

PaulP contains multitudes. Or a commission, at least.


RRS



--
Daniel C. Sobral

I travel to the future all the time.

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland