-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try some more optimizations #9409
Conversation
test performance please |
performance test scheduled: 1 job(s) in queue, 0 running. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/9409/ to see the changes. Benchmarks is based on merging with master (0f1a23e) |
test performance please |
performance test scheduled: 1 job(s) in queue, 0 running. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/9409/ to see the changes. Benchmarks is based on merging with master (0f1a23e) |
Note that |
Why did stdlib fail? Was that a trasient failure? |
test performance please |
performance test scheduled: 1 job(s) in queue, 1 running. |
It is not transient, it has been failing since #8652 . I'll propose a fix ASAP. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/9409/ to see the changes. Benchmarks is based on merging with master (eb3b0ac) |
|
@retronym I notice there's an unexpected lazy val bitmap and given_Context$lzy1 in there, which can both be avoided. If we could shave off one more word, we'd be down to 72. |
test performance please |
performance test scheduled: 1 job(s) in queue, 0 running. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/9409/ to see the changes. Benchmarks is based on merging with master (fd18546) |
test performance please |
performance test scheduled: 1 job(s) in queue, 0 running. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/9409/ to see the changes. Benchmarks is based on merging with master (fd18546) |
test performance please |
performance test scheduled: 1 job(s) in queue, 1 running. |
performance test failed: Please check http://lamppc37.epfl.ch:8000/pull-9409-07-25-10.55.out for more information |
test performance please |
performance test scheduled: 1 job(s) in queue, 0 running. |
performance test scheduled: 1 job(s) in queue, 1 running. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/9409/ to see the changes. Benchmarks is based on merging with master (8c94870) |
1 similar comment
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/9409/ to see the changes. Benchmarks is based on merging with master (8c94870) |
99898df
to
5a37540
Compare
Looking at these benchmarks, our own HashSet is clearly the fastest so we should use it wherever possible. First tests without GC: ``` java.util.HashMap took 1977.537756 ms java.util.IdentityHashMap took 2123.028843 ms scala.collection.HashMap took 2116.062172 ms scala.collection.HashSet took 1998.378418 ms dotty.tools.dotc.HashSet took 1429.826866 ms ``` Second tests with System.gc() run before every test: ``` java.util.HashMap took 1980.977419 ms java.util.IdentityHashMap took 2082.178216 ms scala.collection.HashMap took 2101.882151 ms scala.collection.HashSet took 1967.379402 ms dotty.tools.dotc.HashSet took 1450.755273 ms ```
Allow to record total sizes of collections on which some selected operation is performed. # Conflicts: # compiler/src/dotty/tools/dotc/transform/Instrumentation.scala
Add nestedExists extension method for List[List[T]] exists and optimize it as well as nestedMap.
Avoid closures for copied and simple. Avoid substitutions for simple.
Make all orElse methods that take a call-by-name argument inline methods.
Run stats only at last run. This allows one to warm up and JOT compile code before measurements start.
If Stats is enabled, track total time spent in - implicit search overall - searching implicits in context / in type scope - typedImplicit
See scala#9748 for why this is necessary
When tranisitioning from dense to hashing, we grow the table more than usual since otherwise we'd have to grow it again at the very next addEntry. The condition for this was wrong for HashMaps.
5a37540
to
682ed70
Compare
Make criterion when to fill a hole in a HashMap or HashSet remove more robust. The old criterion relied on fill factor always being less than 0.5. The new criterion works for arbitrary fill factors.
test performance please |
performance test scheduled: 4 job(s) in queue, 1 running. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/9409/ to see the changes. Benchmarks is based on merging with master (ce48f5a) |
Based on #9405 and includes #9414.
Together with #9405 and #9343, this reduces total memory allocated to contexts by 2/3rds and total memory allocated to TypeComparers to practically nothing.