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

scalac's overly optimistic implicit quest

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

I can't profile scalac with yourkit anymore (details at #2089, and based
on my last evaluation the other profilers suck so badly in comparison
that I would first settle for slow) so I can't say with any certainty
what impact this is having on speed, however it shouts "pathological
performance bug" to me.

I tried to build scalac with -Ydebug, and before it chokes on its tongue
because you can't actually build scalac with -Ydebug because various
debug messages have the side effect of breaking the build, it outputs
some lines that look like this:

http://www.improving.org/scala/scalac-out-jun23.txt

There are two lines in that file and it's 47K, so you can see there is
some meat on the bones.

It is possible this output is another unfortunate side effect of -Ydebug
and it's not actually flailing this hard unless we try to see what it's
doing; the inability to confirm that is another frustration that comes
with the compiler's debug-message-induced nondeterminism. But in case
anyone can tell what it's doing and why it's doing it and whether we can
stop it from doing it, here it is.

Here is a little taste of the contents. The "A" series(es) get quite a
bit longer than this.

[scalacfork] no implicits found for
scala.this.Function1[scala.this.Tuple3[scala.this.Nothing,
scala.this.Nothing,scala.this.Nothing],scala.this.Array[?A[
_>:(A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,
A,A,A,A,A,A,A,A,A,A)
|
_<:(A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,
A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,
A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,
A,A,A,A&0)
] _= ]]

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