diff options
author | Martin Odersky <odersky@gmail.com> | 2014-01-26 12:23:21 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-01-26 18:52:33 +0100 |
commit | f7e79bfbdef1123273d5f872572a6a6d55a2cd81 (patch) | |
tree | b9b4c44124765fd8d0c4856e88294487b70a67a5 /src/dotty/tools/dotc/util/Stats.scala | |
parent | 14021cb5e7c8831c7f64d56b8665b7ca79771601 (diff) | |
download | dotty-f7e79bfbdef1123273d5f872572a6a6d55a2cd81.tar.gz dotty-f7e79bfbdef1123273d5f872572a6a6d55a2cd81.tar.bz2 dotty-f7e79bfbdef1123273d5f872572a6a6d55a2cd81.zip |
Better caching of types
Now, PolyTypes, BoundTypes and TypeVars are cached, too. This leads to the following changes:
- unique types table 135K -> 310K
- uncached types 923K -> 0.5K (these are types that are cachable, but contain an uncached part)
- cached type allocs 3420K -> 4322K
- runtime on dotc (24KLOC) 31sec -> 20sec
So, it's a big net win, but we should watch the size of the uniue types table; possibly make it weak.
Diffstat (limited to 'src/dotty/tools/dotc/util/Stats.scala')
-rw-r--r-- | src/dotty/tools/dotc/util/Stats.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/util/Stats.scala b/src/dotty/tools/dotc/util/Stats.scala index efae6be34..95b50cf58 100644 --- a/src/dotty/tools/dotc/util/Stats.scala +++ b/src/dotty/tools/dotc/util/Stats.scala @@ -24,7 +24,7 @@ object Stats { } } - private var monitored = false + var monitored = false def track[T](fn: String)(op: => T) = if (monitored) { |