Skip to content

Conversation

alex28sh
Copy link
Contributor

No description provided.

@bashor bashor requested a review from igoriakovlev October 1, 2025 14:01
@igoriakovlev
Copy link
Collaborator

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
Copy link
Collaborator

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())
Copy link
Collaborator

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.

Copy link
Contributor Author

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

@alex28sh alex28sh force-pushed the WhenMicroBenchmarks branch from cb93cf6 to 96d4e27 Compare October 7, 2025 11:14
@alex28sh alex28sh requested a review from igoriakovlev October 7, 2025 11:19
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