-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Reorder match based on frequency #3262
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
Reorder match based on frequency #3262
Conversation
test performance please |
performance test scheduled: 1 job(s) in queue, 0 running. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/3262/ to see the changes. Benchmarks is based on merging with master (4aa13b0) |
Where did you get the frequency data from? I believe the previous scheme was already optimized for dotty bootstrap. With the new scheme dotty bootstrap seems slower. Could be noise, of course. |
test performance please |
performance test scheduled: 3 job(s) in queue, 1 running. |
I got the frequencies by compiling dotty bootstrapped with counters I added to the pattern match branches. |
I see. The numbers I looked at was total numbers of trees generated. It seems there are some small differences there. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/3262/ to see the changes. Benchmarks is based on merging with master (20a8ea7) |
@nicolasstucki You'll go two points ahead to find the previous testing point, as there are two merges after the first test point. |
@liufengyun Perhaps the testing points could be shown in a different color (blue) ? |
1e90e31
to
f37fe1d
Compare
test performance please |
performance test scheduled: 8 job(s) in queue, 1 running. |
transformUnnamed total number of matches when compiling the dotty bootstrapped compiler (Apply,988737) (TypeTree,938211) (Thicket,314168) (This,258670) (Literal,207556) (Block,200439) (TypeApply,142962) (If,86724) (New,51117) (Typed,43350) (CaseDef,41226) (Closure,31121) (Assign,29101) (SeqLiteral,24646) (Super,19849) (Template,18180) (Match,11466) (default,10334) (UnApply,9327) (PackageDef,6392) (Try,1655) (Inlined,1528) (Return,1255) (Alternative,659)
f37fe1d
to
61f897c
Compare
test performance please |
performance test scheduled: 8 job(s) in queue, 1 running. |
performance test failed: Error line number: 16 [check /data/workspace/bench/logs/pull-3262-10-05-21.55.out for more information] |
1 similar comment
performance test failed: Error line number: 16 [check /data/workspace/bench/logs/pull-3262-10-05-21.55.out for more information] |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/3262/ to see the changes. Benchmarks is based on merging with master (af528a1) |
1 similar comment
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/3262/ to see the changes. Benchmarks is based on merging with master (af528a1) |
foldOver total number of matches when compiling the dotty bootstrapped compiler (TypeRef,880390) (AppliedType,276595) (BoundType,122879) (ThisType,117388) (LambdaType,95690) (NoPrefix,94493) (TermRef,88508) (TypeVar,30322) (ExprType,16702) (TypeBounds,16432) (AndOrType,6234) (AnnotatedType,5948) (default,5252) (ProtoType,4044) (RefinedType,3270) (WildcardType,2064) (ClassInfo,1520) (JavaArrayType,516) (SkolemType,210) (TypeArgRef,98) (SuperType,77) (LazyRef,3)
5eaf651
to
57661ee
Compare
NamedPartsAccumulator.apply total number of matches when compiling the dotty bootstrapped compiler (TypeRef,255627) (ThisType,128253) (NoPrefix,67972) (TermRef,33240) (AppliedType,22874) (default,13428) (TypeBounds,5013) (ParamRef,3931) (ConstantType,1893)
test performance please |
performance test scheduled: 1 job(s) in queue, 0 running. |
I won't put more reorderings in this PR. It is ready for review |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/3262/ to see the changes. Benchmarks is based on merging with master (af528a1) |
The benchmark results appear empty to me, so it's hard to review this :). |
test performance please |
performance test scheduled: 11 job(s) in queue, 1 running. |
I've cleaned up the rubbish in the data resulted from the exception in |
@nicolasstucki From the benchmarks result it's unclear if the reordering had any effect, did you see a difference in local testing? |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/3262/ to see the changes. Benchmarks is based on merging with master (4062c4a) |
It does not seem to matter much, but it can't possibly make things worse. So, LGTM. |
No description provided.