Skip to content

Commit 9e87713

Browse files
committed
Slightly change ArithmeticBenchmark
1 parent 54a33f8 commit 9e87713

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/commonMain/kotlin/microBenchmarks/ArithmeticBenchmark.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ArithmeticBenchmark {
3636
var i = 1
3737
var j = 1
3838
while (i < BENCHMARK_SIZE) {
39-
j += (i shl 1234) / 42 / j / 42 / j / 42 / j
39+
j += (i shl 1234) / 42 / i / 42 / j / 42 / i
4040
i++
4141
}
4242
return j
@@ -58,7 +58,7 @@ class ArithmeticBenchmark {
5858
var i = 1
5959
var j = 1
6060
while (i < BENCHMARK_SIZE) {
61-
j += (i shl 1234) % 42 % j % 42 % j % 42 % j
61+
j += (i shl 1234) % 42 % i % 42 % j % 42 % i
6262
i++
6363
}
6464
return j

0 commit comments

Comments
 (0)