Skip to content

Commit

Permalink
Remove redundant cast when calculating integer power
Browse files Browse the repository at this point in the history
  • Loading branch information
findepi committed Jul 31, 2023
1 parent f8f71fc commit 1ced132
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
package io.trino.benchmark;

import com.google.common.collect.ImmutableMap;
import com.google.common.math.IntMath;
import io.trino.testing.LocalQueryRunner;

import static io.trino.benchmark.BenchmarkQueryRunner.createLocalQueryRunner;
Expand All @@ -35,7 +36,7 @@ public static void main(String[] args)
{
LocalQueryRunner localQueryRunner = createLocalQueryRunner(ImmutableMap.of("resource_overcommit", "true"));
for (int i = 0; i < 11; i++) {
new SqlTopNBenchmark(localQueryRunner, (int) Math.pow(4, i)).runBenchmark(new SimpleLineBenchmarkResultWriter(System.out));
new SqlTopNBenchmark(localQueryRunner, IntMath.pow(4, i)).runBenchmark(new SimpleLineBenchmarkResultWriter(System.out));
}
}
}

0 comments on commit 1ced132

Please sign in to comment.