-
Notifications
You must be signed in to change notification settings - Fork 5
WhenBenchmark #9
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
base: main
Are you sure you want to change the base?
Conversation
Did you check is there some noticeable difference for these benchmark's scores between Kotlin with enabled optimisation and without it? |
@State(Scope.Benchmark) | ||
class WhenBenchmark { | ||
|
||
private val integers = 100500..100510 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure, but maybe it would be better to initialize (at least non primitive variables) with @setup section, like other benchmak's do
@Setup | ||
fun setup() { | ||
for (i in 1..BENCHMARK_SIZE) { | ||
charsData.add(chars.random()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not use stdlib (or any other not stable sequence generator) random generator for the benchmarks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@igoriakovlev changed randomized generation to deterministic one
Migrate deprecated APIs to actual ones and cleanup imports.
cb93cf6
to
96d4e27
Compare
No description provided.