Closed
Description
After bootstrapping with the all the latest and greatest in 2.12 (new optimizer, indy functions, no impl classes), a quick test shows performance is about on par with 2.11.8. I tested this by compiling src/library
with both compilers.
Analysing the YourKit profiles of the new compiler does show some small opportunities for improvements.
- Name related operations, addressed by Micro optimise Symbol#fullName scala#4954 (not yet merged to 2.12.x). This needs to be merged forwards to 2.12.x
- Initialization of
TyperDiagnostics#deadCode
(which is itself dead code outside of-Ydead-code
!) - Initialiation of
object ArrayInstantiation
on everytypedSelect
(no need for that to be nested where it is, move toTreeInfo
. - Initalization of
Reporter#ERROR
. We create a lot moreReporter
instances these times, we should try to be less allocation hungry in the common case whenhasErrors
is false. - Consider changing
reflect.internal.util.WeakHashSet
to use.equals
rather than==
(to avoid type tests inBoxesRuntimes.equals
.
I've got additional ideas and tools that I collected previously here: https://gist.github.com/retronym/86ec6ad9ccd2c22f6148
Metadata
Metadata
Assignees
Labels
No labels