Skip to content

Improve performance of generic tuples code generation #6532

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

Conversation

nicolasstucki
Copy link
Contributor

Improves the state of #6524.

Instead of convering all tuples to arrays and performing the operations on them,
we take advantage of the fact that those Tuples are products and have productIterators.
Implementations of tail, *: and ++ on iterators do not require extra collentions to be created,
hence it is also probably more performant at runtime.

@nicolasstucki
Copy link
Contributor Author

test performance with #default please

@dottybot
Copy link
Member

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

@nicolasstucki nicolasstucki force-pushed the improve-performance-of-generic-tuples branch from e1d85ee to e3fa650 Compare May 18, 2019 08:25
Improves the state of scala#6524.

Instead of convering all tuples to arrays and performing the operations on them,
we take advantage of the fact that those Tuples are products and have productIterators.
Implementations of tail, *: and ++ on iterators do not require extra collentions to be created,
hence it is also probably more performant at runtime.
@nicolasstucki nicolasstucki force-pushed the improve-performance-of-generic-tuples branch from 3584d48 to c81c258 Compare May 18, 2019 09:42
@nicolasstucki
Copy link
Contributor Author

test performance with #default please

@dottybot
Copy link
Member

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

@nicolasstucki
Copy link
Contributor Author

nicolasstucki commented May 18, 2019

Performance of compiling (on my laptop)

1 *: 2 *: 3 *: 4 *: 5 *: 6 *: 7 *: 8 *: 9 *: 10 *: 11 *: 12 *: 13 *: 14 *: 15 *: 16 *: 17 *: 18 *: 19 *: 20 *: 21 *: 22 *: ()
// master: 419.855 ±(99.9%) 44.090 ms/op [Average]
// after first commit: 254.921 ±(99.9%) 3.946 ms/op [Average]
// after second commit: 237.878 ±(99.9%) 2.846 ms/op [Average]

@dottybot
Copy link
Member

Performance test finished successfully:

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

Benchmarks is based on merging with master (fb6667b)

@nicolasstucki nicolasstucki marked this pull request as ready for review May 18, 2019 11:04
@nicolasstucki nicolasstucki requested a review from odersky May 18, 2019 11:33
@dottybot
Copy link
Member

Performance test finished successfully:

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

Benchmarks is based on merging with master (fb6667b)

@nicolasstucki
Copy link
Contributor Author

Subsumed by #6539

@nicolasstucki
Copy link
Contributor Author

test performance with #tuples please

@dottybot
Copy link
Member

dottybot commented Jun 3, 2019

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

@dottybot
Copy link
Member

dottybot commented Jun 3, 2019

Performance test finished successfully:

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

Benchmarks is based on merging with master (bf89558)

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.

3 participants