Skip to content

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

Merged
merged 3 commits into from
Oct 8, 2017

Conversation

nicolasstucki
Copy link
Contributor

No description provided.

@nicolasstucki
Copy link
Contributor Author

test performance please

@dottybot
Copy link
Member

dottybot commented Oct 5, 2017

performance test scheduled: 1 job(s) in queue, 0 running.

@dottybot
Copy link
Member

dottybot commented Oct 5, 2017

Performance test finished successfully:

Visit http://dotty-bench.epfl.ch/3262/ to see the changes.

Benchmarks is based on merging with master (4aa13b0)

@odersky
Copy link
Contributor

odersky commented Oct 5, 2017

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.

@nicolasstucki
Copy link
Contributor Author

test performance please

@dottybot
Copy link
Member

dottybot commented Oct 5, 2017

performance test scheduled: 3 job(s) in queue, 1 running.

@nicolasstucki
Copy link
Contributor Author

I got the frequencies by compiling dotty bootstrapped with counters I added to the pattern match branches.

@odersky
Copy link
Contributor

odersky commented Oct 5, 2017

I see. The numbers I looked at was total numbers of trees generated. It seems there are some small differences there.

@dottybot
Copy link
Member

dottybot commented Oct 5, 2017

Performance test finished successfully:

Visit http://dotty-bench.epfl.ch/3262/ to see the changes.

Benchmarks is based on merging with master (20a8ea7)

@liufengyun
Copy link
Contributor

@nicolasstucki You'll go two points ahead to find the previous testing point, as there are two merges after the first test point.

@smarter
Copy link
Member

smarter commented Oct 5, 2017

@liufengyun Perhaps the testing points could be shown in a different color (blue) ?

@nicolasstucki nicolasstucki force-pushed the reorder-match-based-on-fequency branch from 1e90e31 to f37fe1d Compare October 5, 2017 19:38
@nicolasstucki
Copy link
Contributor Author

test performance please

@dottybot
Copy link
Member

dottybot commented Oct 5, 2017

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)
@nicolasstucki nicolasstucki force-pushed the reorder-match-based-on-fequency branch from f37fe1d to 61f897c Compare October 5, 2017 19:55
@nicolasstucki
Copy link
Contributor Author

test performance please

@dottybot
Copy link
Member

dottybot commented Oct 5, 2017

performance test scheduled: 8 job(s) in queue, 1 running.

@dottybot
Copy link
Member

dottybot commented Oct 5, 2017

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
@dottybot
Copy link
Member

dottybot commented Oct 5, 2017

performance test failed:

Error line number: 16

[check /data/workspace/bench/logs/pull-3262-10-05-21.55.out for more information]

@dottybot
Copy link
Member

dottybot commented Oct 5, 2017

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
@dottybot
Copy link
Member

dottybot commented Oct 5, 2017

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)
@nicolasstucki nicolasstucki force-pushed the reorder-match-based-on-fequency branch from 5eaf651 to 57661ee Compare October 6, 2017 05:31
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)
@nicolasstucki
Copy link
Contributor Author

test performance please

@dottybot
Copy link
Member

dottybot commented Oct 6, 2017

performance test scheduled: 1 job(s) in queue, 0 running.

@nicolasstucki
Copy link
Contributor Author

I won't put more reorderings in this PR. It is ready for review

@dottybot
Copy link
Member

dottybot commented Oct 6, 2017

Performance test finished successfully:

Visit http://dotty-bench.epfl.ch/3262/ to see the changes.

Benchmarks is based on merging with master (af528a1)

@smarter
Copy link
Member

smarter commented Oct 6, 2017

The benchmark results appear empty to me, so it's hard to review this :).

@liufengyun
Copy link
Contributor

test performance please

@dottybot
Copy link
Member

dottybot commented Oct 6, 2017

performance test scheduled: 11 job(s) in queue, 1 running.

@liufengyun
Copy link
Contributor

liufengyun commented Oct 6, 2017

I've cleaned up the rubbish in the data resulted from the exception in scalapb and a bug in the script. Now the charts are visisble (need refresh, clear cache?).

@smarter
Copy link
Member

smarter commented Oct 6, 2017

@nicolasstucki From the benchmarks result it's unclear if the reordering had any effect, did you see a difference in local testing?

@dottybot
Copy link
Member

dottybot commented Oct 6, 2017

Performance test finished successfully:

Visit http://dotty-bench.epfl.ch/3262/ to see the changes.

Benchmarks is based on merging with master (4062c4a)

@odersky
Copy link
Contributor

odersky commented Oct 7, 2017

It does not seem to matter much, but it can't possibly make things worse. So, LGTM.

@odersky odersky merged commit 898a164 into scala:master Oct 8, 2017
@allanrenucci allanrenucci deleted the reorder-match-based-on-fequency branch December 14, 2017 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants