Skip to content
Rory Graves edited this page May 4, 2017 · 2 revisions

Symbol.ownerChain

Uses of Symbol.ownerChain create a list on each call, but often do an exists or contains call. Save garbage and work by creating specialised methods - (e.g. ownerCheckExists(Symbol => Boolean) ) Branch has initial impl for https://github.com/rorygraves/scalac_perf/tree/2.12.x_ownerChain

GenSymbols.scala:74 .tail.tail.exists !!!!!

WeakHashSet oldTable.size

This should be oldTable.length (prevents creation of ArrayOps) IntelliJ inspection might be able to find a lot more of these.

#Symbols.markFlagsComplete

This is a varargs method that should not be - it generates arrays and WrappedArrays to pass, in most cases, a single argument. Every usage is either one or two arguments

Clone this wiki locally