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

Allow JVM to optimize code before running experiments #131

Open
rmartinsanta opened this issue Jan 30, 2023 · 1 comment
Open

Allow JVM to optimize code before running experiments #131

rmartinsanta opened this issue Jan 30, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@rmartinsanta
Copy link
Member

Is your feature request related to a problem? Please describe.
When running a small number of iterations, specially if runtimes are short, the jump between interpret mode and compiled mode by the JVM after executing a method several times is pretty noticeable in the results, and could lead to wrong assumptions by the user.

Describe the solution you'd like
Allow the user to specify a fast instance that will be run before the main experiment for all configurations. This way, most code should be already compiled and cached by the JVM by the time the main experiment run. Additionally, during instance validation, we could guess which instance is the smallest one, if not specified by the user, by smallest load time / smallest file size, requiring zero configuration.

Additional context
https://www.baeldung.com/jvm-tiered-compilation

@rmartinsanta rmartinsanta added the enhancement New feature or request label Jan 30, 2023
@rmartinsanta
Copy link
Member Author

The feature can be tested using -XX:+PrintCompilation, the idea is that before the main experiments run, critical code paths should be already compiled and optimized by C2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant