Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
Replace Math.pow with simple * operator in ModExp precompile
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalinin committed Aug 22, 2017
1 parent 1844b48 commit 76fc7e9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public byte[] execute(byte[] data) {

private long getMultComplexity(long x) {

long x2 = (long) Math.pow(x, 2);
long x2 = x * x;

if (x <= 64) return x2;
if (x <= 1024) return x2 / 4 + 96 * x - 3072;
Expand Down

0 comments on commit 76fc7e9

Please sign in to comment.