- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
booking one second
Fri, 2011-02-18, 22:37
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
Fri, 2011-02-18, 23:27
#2
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.
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?