The Scala Compiler Corner

63 views
Skip to first unread message

Miguel Garcia

unread,
Jan 2, 2010, 10:17:14 AM1/2/10
to The Java Posse

Hi,


After two months of build-up, I want to bring to your attention

The Scala Compiler Corner

http://www.sts.tu-harburg.de/people/mi.garcia/ScalaCompilerCorner/

a growing collection of resources on how the Scala compiler works (and
how it can be hacked).

Besides write-ups on the implementation of built-in compilation
phases, you'll find resources to write your own compiler plugins to
perform additional or alternative processing on the syntax trees.


Contributions are very welcome!


Miguel Garcia
http://www.sts.tu-harburg.de/people/mi.garcia/


Kevin Wright

unread,
Jan 2, 2010, 12:03:45 PM1/2/10
to java...@googlegroups.com
Sweeter than a sweet thing with and extra helping of especially sweet sugar on top :)


2010/1/2 Miguel Garcia <mgarc...@yahoo.com>


--

You received this message because you are subscribed to the Google Groups "The Java Posse" group.
To post to this group, send email to java...@googlegroups.com.
To unsubscribe from this group, send email to javaposse+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.





--
Kevin Wright

mail/google talk: kev.lee...@googlemail.com
wave: kev.lee...@googlewave.com
skype: kev.lee.wright
twitter: @thecoda

Michael Neale

unread,
Jan 4, 2010, 8:08:09 PM1/4/10
to The Java Posse
Thanks Miguel.

I do often feel that the scala compiler is a tad slow (more that javac
and JDT are fast) - have other people noticed and do you know what is
being done about it? I appreciate the cleverness of the scala
compiler, but if the downside is slower turn around for me, I am less
excited about its innovations :(

kirk

unread,
Jan 4, 2010, 9:07:51 PM1/4/10
to java...@googlegroups.com
Hi Michael,

I've profiled the Scala compiler for Bill Venners and have passed the
information back. Scala compiler is slow because 1) it is single
threaded. I would have thought that a language/runtime that was tuned
for threading would have a multi-threaded compiler ;-) 2) the symbol
table backed by a hashmap will resize several 100s of thousands of time
for any application of any reasonable size. So, GC is a problem. To make
the compile a bit faster 1) use a larger heap and 2) make sure you're
using iCMS.

Regards,
Kirk

Miguel Garcia

unread,
Jan 5, 2010, 8:31:41 AM1/5/10
to The Java Posse

The reasons sketched above depict quite accurately why scalac is slow.
Looking into the future, there's a discussion on how scalac could be
faster at:
http://comments.gmane.org/gmane.comp.lang.scala.internals/2692


Miguel
http://www.sts.tu-harburg.de/people/mi.garcia

Reply all
Reply to author
Forward
0 new messages