diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-11-01 11:40:26 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-11-01 11:56:54 +0100 |
commit | a1d9656299a90d9ea4d5aa14a7873e3b4941eb59 (patch) | |
tree | 21affb2ad94f25be36b2b2c53c3f19b5c5e8a21f /test/checker-tests/fail7.scala | |
parent | c38235fd44f1ccb280e31a2f34f58deb59c5b2ee (diff) | |
download | scala-a1d9656299a90d9ea4d5aa14a7873e3b4941eb59.tar.gz scala-a1d9656299a90d9ea4d5aa14a7873e3b4941eb59.tar.bz2 scala-a1d9656299a90d9ea4d5aa14a7873e3b4941eb59.zip |
Don't use runtime reflection from the batch compiler.
Not only does this save a big chunk of time on startup by avoiding
classloading and symbol table population, but it also seems to
improve steady state performance of the compiler.
Theory: JIT can optimize more aggressively without the
SynchronizedXxx decorators and the like being in the classloader.
See "Class Heirarchy Analyis" in [1]
This commit does this by:
- Avoiding use of FromString in pattern matcher, instead
using an established mechanism to parse system properties.
- Changes FromString back to use OptManifest. AFAICT, this
is now only a dependency of scala.tools.cmd.gen.Codegen,
so this is just a defensive measure.
The REPL still uses runtime reflection, so will pay a little
performance tax.
Benchmark:
avg shortest 10 times 744ms # before
avg shortest 10 times 675ms # after
[1] https://wikis.oracle.com/display/HotSpotInternals/PerformanceTechniques
Diffstat (limited to 'test/checker-tests/fail7.scala')
0 files changed, 0 insertions, 0 deletions