Skip to content
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

Add compiletime benchmarks and fix performance regression #14273

Merged
merged 2 commits into from
Jan 20, 2022

Conversation

mbovel
Copy link
Member

@mbovel mbovel commented Jan 14, 2022

The PR adds 5 new benchmarks aimed at monitoring the performance of compile-time operations (scala.compiletime.ops.*), more particularly those on integers. This is in prevision of my next PRs that will extend the normalization of these operations.

The new benchmarks are generated inside a folder bench/tests-generated. The resulting files are not committed to avoid adding 1.5 MB of repetitive code to the repository. The reason I made these benchmarks that large is because I wanted runtimes of at least 500 ms so that these are one order of magnitude slower than the empty baseline which runs in ~50 ms.

I hesitated to generate these benchmarks using SBT's source generators but I thought that having both the generation code and results directly inside bench was better for discoverability and navigation. The chosen design also made it simpler to write the profile file.

The idea is to not run these benchmarks automatically on every performance test, but only when specifically asking for them using test performance with #compiletime-ops please. Running these 5 benchmarks with the suggested configuration takes approximately half an hour.


This PR also fixes a performance regression introduced in #13400. The regression is documented in #14259 (comment).

@mbovel mbovel marked this pull request as ready for review January 14, 2022 16:37
@mbovel mbovel requested a review from soronpo January 17, 2022 22:00
Copy link
Contributor

@soronpo soronpo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mbovel mbovel changed the title Add compiletime benchmarks Add compiletime benchmarks and fix performance regression Jan 18, 2022
@mbovel
Copy link
Member Author

mbovel commented Jan 18, 2022

test performance please

@dottybot
Copy link
Member

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

@dottybot
Copy link
Member

Performance test finished successfully:

Visit https://dotty-bench.epfl.ch/14273/ to see the changes.

Benchmarks is based on merging with master (7939ddb)

@mbovel
Copy link
Member Author

mbovel commented Jan 18, 2022

test performance with #compiletime-ops please

@dottybot
Copy link
Member

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

@mbovel
Copy link
Member Author

mbovel commented Jan 18, 2022

test performance with #compiletime please

@dottybot
Copy link
Member

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

@dottybot
Copy link
Member

Performance test finished successfully:

Visit https://dotty-bench.epfl.ch/14273/ to see the changes.

Benchmarks is based on merging with master (9e14f5f)

@mbovel
Copy link
Member Author

mbovel commented Jan 18, 2022

test performance with #compiletime please

@dottybot
Copy link
Member

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

@dottybot
Copy link
Member

Performance test finished successfully:

Visit https://dotty-bench.epfl.ch/14273/ to see the changes.

Benchmarks is based on merging with master (9e14f5f)

@mbovel
Copy link
Member Author

mbovel commented Jan 18, 2022

test performance with #compiletime please

@dottybot
Copy link
Member

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

@dottybot
Copy link
Member

Performance test finished successfully:

Visit https://dotty-bench.epfl.ch/14273/ to see the changes.

Benchmarks is based on merging with master (9e14f5f)

@mbovel
Copy link
Member Author

mbovel commented Jan 18, 2022

test performance with #compiletime please

@dottybot
Copy link
Member

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

@dottybot
Copy link
Member

Performance test finished successfully:

Visit https://dotty-bench.epfl.ch/14273/ to see the changes.

Benchmarks is based on merging with master (9e14f5f)

Copy link
Contributor

@OlivierBlanvillain OlivierBlanvillain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@mbovel mbovel force-pushed the mb/compiletime-ops-benchmarks branch from c9ba658 to 0b5005d Compare January 20, 2022 10:03
@mbovel
Copy link
Member Author

mbovel commented Jan 20, 2022

test performance with #compiletime please

@dottybot
Copy link
Member

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

@dottybot
Copy link
Member

Performance test finished successfully:

Visit https://dotty-bench.epfl.ch/14273/ to see the changes.

Benchmarks is based on merging with master (819c2ff)

@mbovel mbovel merged commit 2654b56 into scala:master Jan 20, 2022
@mbovel mbovel deleted the mb/compiletime-ops-benchmarks branch January 20, 2022 11:56
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.

4 participants