- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Big actors speed improvement in Scala 2.7.3
Wed, 2009-01-14, 00:23
Hi all!
I have this simple Actors example, described here:
http://sujitpal.blogspot.com/2009/01/more-java-actor-frameworks-compared...
It sends 1 million simple messages through three simple actors
that just slightly modifies the message and passes it along.
Tried it with 2.7.2 and 2.7.3, and got about 30% speed
improvement in 2.7.3!
Mats
Wed, 2009-01-14, 01:17
#2
Re: Big actors speed improvement in Scala 2.7.3
Is there some kind of roadmap of features planned for 2.8? Also, is there a rough schedule for when the release might happen?
I'm just curious because I've seen 2.8 mentioned here a few times lately.
Robert
On Tue, Jan 13, 2009 at 6:38 PM, martin odersky <martin.odersky@epfl.ch> wrote:
I'm just curious because I've seen 2.8 mentioned here a few times lately.
Robert
On Tue, Jan 13, 2009 at 6:38 PM, martin odersky <martin.odersky@epfl.ch> wrote:
On Wed, Jan 14, 2009 at 12:16 AM, Mats Henricson <mats@henricson.se> wrote:
> Hi all!
>
> I have this simple Actors example, described here:
>
> http://sujitpal.blogspot.com/2009/01/more-java-actor-frameworks-compared.html
>
> It sends 1 million simple messages through three simple actors
> that just slightly modifies the message and passes it along.
>
> Tried it with 2.7.2 and 2.7.3, and got about 30% speed
> improvement in 2.7.3!
>
Good! Philip found out that an excessive time was spent in
System.currentTimeMillis, which is used to implement a crude
monitoring framework to dynamically resize the threadpool.
The optimization calls currentTimeMillis less often than before.
But the whole complication is really caused by the wish to stay JDK
1.4 compatible. JDK 1.4 does not have a very good API for threads, and
this limits what we can do in Scala actors.
Scala 2.8 will drop JDK 1.4 compatibility. Expect significant further
speed improvements for actors then.
Cheers
-- Martin
Wed, 2009-01-14, 10:57
#3
Re: Big actors speed improvement in Scala 2.7.3
On Wed, Jan 14, 2009 at 1:13 AM, Robert Kosara wrote:
> Is there some kind of roadmap of features planned for 2.8? Also, is there a
> rough schedule for when the release might happen?
There is not, just a hope that it will be out later this year. It's
difficult to do a roadmap, as some of the proposed additions (trait
parameters, virtual classes) are very hard to get specified right and
be implemented correctly. So depending how that goes, we might go
ahead with a reduced feature set for 2.8, if some proposed extensions
are too difficult or take too long.
Cheers
On Wed, Jan 14, 2009 at 12:16 AM, Mats Henricson wrote:
> Hi all!
>
> I have this simple Actors example, described here:
>
> http://sujitpal.blogspot.com/2009/01/more-java-actor-frameworks-compared...
>
> It sends 1 million simple messages through three simple actors
> that just slightly modifies the message and passes it along.
>
> Tried it with 2.7.2 and 2.7.3, and got about 30% speed
> improvement in 2.7.3!
>
Good! Philip found out that an excessive time was spent in
System.currentTimeMillis, which is used to implement a crude
monitoring framework to dynamically resize the threadpool.
The optimization calls currentTimeMillis less often than before.
But the whole complication is really caused by the wish to stay JDK
1.4 compatible. JDK 1.4 does not have a very good API for threads, and
this limits what we can do in Scala actors.
Scala 2.8 will drop JDK 1.4 compatibility. Expect significant further
speed improvements for actors then.
Cheers