@@ -6,7 +6,7 @@ Three alternatives:
6
6
7
7
1 . No implicit shortcuts
8
8
2 . Implicit shortcuts only for possible targets of megamorphic dispatch
9
- (` specializeMonoTargets ` set to false)
9
+ (` specializeMonoTargets ` in [ ShortcutImplicits.scala ] ( ../../../compiler/src/dotty/tools/dotc/transform/ShortcutImplicits.scala ) set to false)
10
10
3 . Implicit shortcuts for all methods returning implicit function types
11
11
(` specializeMonoTargets ` set to true)
12
12
@@ -44,7 +44,7 @@ Two benchmarks:
44
44
45
45
In the fully monomorphic benchmark, specializing
46
46
only megamorphic targets has the same performance as
47
- not spezializing at all (not surprising, since there
47
+ not specializing at all (not surprising, since there
48
48
are no megamorphic targets). Specializing everything
49
49
incurs about a 14% performance hit (maybe due to the extra
50
50
code generated; it's hard to pin down what it is).
@@ -53,13 +53,13 @@ Note: We compute relative performance differences by comparing the
53
53
second-best test runs of each series with each other.
54
54
55
55
In the megamorphic benchmark, it's the other way round.
56
- Specializing only megamorphic callsites leads to a performance
56
+ Specializing only megamorphic call-sites leads to a performance
57
57
improvement of about 36% compared to no specialization. Specializing
58
58
everything leads to another 37% improvement (85% total compared
59
59
to no specialization).
60
60
61
61
I think we need larger benchmarks to decide whether we should
62
- specicialize monomorphic call-targets or not.
62
+ specialize monomorphic call-targets or not.
63
63
64
64
### Comparing with the Reader Monad
65
65
0 commit comments