Skip to content

Commit

Permalink
Add unscaled values to decimal operators addition benchmark
Browse files Browse the repository at this point in the history
Addition benchmark relied only on values that needed rescaling,
which is a multiplication by a power of 10.
Benchmarking unscaled values makes addition benchmark more synthetic.
  • Loading branch information
skrzypo987 authored and sopel39 committed Sep 9, 2020
1 parent ae85047 commit 954611d
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,10 @@ public static class AdditionBenchmarkState
"s1 + s2 + s3 + s4",
"l1 + l2",
"l1 + l2 + l3 + l4",
"s2 + l3 + l1 + s4"})
"s2 + l3 + l1 + s4",
"lz1 + lz2",
"lz1 + lz2 + lz3 + lz4",
"s2 + lz3 + lz1 + s4"})
private String expression = "d1 + d2";

@Setup
Expand All @@ -231,6 +234,11 @@ public void setup()
addSymbol("l3", createDecimalType(20, 6));
addSymbol("l4", createDecimalType(25, 8));

addSymbol("lz1", createDecimalType(35, 0));
addSymbol("lz2", createDecimalType(25, 0));
addSymbol("lz3", createDecimalType(20, 0));
addSymbol("lz4", createDecimalType(25, 0));

generateRandomInputPage();
generateProcessor(expression);
}
Expand Down

0 comments on commit 954611d

Please sign in to comment.