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

booking one second

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

Seeing this made me kind of ill; I didn't realize so much of the startup
penalty was discretionary.

% time jruby -e '5'
real 0m0.733s
% time clojure --eval '5'
real 0m0.903s
% time scala29 -nocompdaemon -e '5'
real 0m4.829s

In the absence of objections I will shortly book the 1s of gain I have
in the bank (which jruby at least also uses) and put the scala jars on
the boot classpath by default. You can already do this with
--usebootcp, I'm just flipping the default. At the same time I'll make
the option naming more consistent and document it.

time scala29 --usebootcp -nocompdaemon -e '5'
real 0m3.879s

odersky
Joined: 2008-07-29,
User offline. Last seen 45 weeks 6 days ago.
Re: booking one second

On Fri, Feb 18, 2011 at 10:37 PM, Paul Phillips wrote:
> Seeing this made me kind of ill; I didn't realize so much of the startup
> penalty was discretionary.
>
> % time jruby -e '5'
> real    0m0.733s
> % time clojure --eval '5'
> real    0m0.903s
> % time scala29  -nocompdaemon -e '5'
> real    0m4.829s
>
> In the absence of objections I will shortly book the 1s of gain I have in
> the bank (which jruby at least also uses) and put the scala jars on the boot
> classpath by default.  You can already do this with --usebootcp, I'm just
> flipping the default.  At the same time I'll make the option naming more
> consistent and document it.
>
> time scala29 --usebootcp -nocompdaemon -e '5'
> real    0m3.879s
>
Yes, looks like a good idea. Do we know where the other overheads come
from? Class loading?

extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
Re: booking one second

On 2/18/11 2:10 PM, martin odersky wrote:
> Yes, looks like a good idea. Do we know where the other overheads come
> from? Class loading?

It's how long it takes to instantiate and initialize a Global (i.e.
including new global.Run, which kicks off definitions.init, etc.) Class
loading is a part of that, but there are many participants in the
conspiracy to take a while.

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