Sleeps for a specified time. Useful to verify the micro-benchmark framework.
sleep | Sleeps for the specified amount of milliseconds. |
Details about measurements in the details.
This benchmark suite shows whether the compiler optimizes simple loops. If any of the benchmarks does not show linear cost, then the compiler optimizes it. This will probably impact other benchmarks as well.
for loop | An empty for loop. |
for loop result | A for loop that accumulates a result in a variable. |
while loop | A while loop that counts in a variable without returning a result. |
while loop result | A while loop that accumulates a result in a variable. |
do while loop | A do-while loop that counts in a variable without returning a result. |
do while loop result | A do-while loop that accumulates a result in a variable. |
Details about measurements in the details.
Integer arithmetic operations.
for loop | A for loop without calculations. This is the reference for the other benchmarks in this suite. |
Int plus | Integer addition. |
Int minus | Integer subtraction. |
Int mult | Integer multiplication. |
Int div | Integer division. |
Details about measurements in the details.
Integer arithmetic operations.
for loop | A for loop without calculations. This is the reference for the other benchmarks in this suite. |
Double plus | Double addition. |
Double minus | Double subtraction. |
Double mult | Double multiplication. |
Double div | Double division. |
Details about measurements in the details.
Arithmetic operations using a 64 bit math context (16 significant digits).
for loop | A for loop without calculations. This is the reference for the other benchmarks in this suite. |
BigDecimal plus | BigDecimal addition. |
BigDecimal minus | BigDecimal subtraction. |
BigDecimal mult | BigDecimal multiplication. |
BigDecimal div | BigDecimal division. |
Details about measurements in the details.
Arithmetic operations using a 128 bit math context (34 significant digits).
for loop | A for loop without calculations. This is the reference for the other benchmarks in this suite. |
BigDecimal plus | BigDecimal addition. |
BigDecimal minus | BigDecimal subtraction. |
BigDecimal mult | BigDecimal multiplication. |
BigDecimal div | BigDecimal division. |
Details about measurements in the details.
Compares the different ways casts can be implemented in Scala.
asInstanceOf | Casts a value using asInstanceOf. |
match case | Casts a value using pattern matching with the type. |
Details about measurements in the details.
Compares the different type of calls in Scala. All calls will return the double integer value of its single integer argument. Example: def anotherMethod(x: Int) = x + x
inlined loop | A loop with the calculating code inlined. |
method | Calls another method in the same class. |
singletonMethod | Calls a method in a singleton object. This corresponds to a static method in Java. |
traitSingletonMethod | Calls a method declared in a trait and implemented in a singleton object. |
traitMethodImpl | Calls a method implemented in a trait. |
traitInstanceMethod | Calls a method declared in a trait and implemented in an anonymous local instance. |
function | Calls a function. |
closure | Calls a closure with a bound variable. |
Details about measurements in the details.
List methods that operate on a single element.
concatRight | Concatenates two lists, where the left list has a single element. |
appendHead | Appends a single element at the head of a list. |
Details about measurements in the details.
List methods that operate on all elements.
sort | Sorts a random list. |
reverse | Reverses a list. |
length | Counts the elements in a list. |
concatLeft | Concatenates two lists, where the right list has a single element |
appendTail | Appends a single element at the tail end of a list. |
Details about measurements in the details.
Immutable Map methods that operate on a single element.
contains true | Checks that a map really contains a value. |
contains false | Checks that a map really does not contain a value. |
+ | Adds a new entry to a map. |
- | Removes an existing entry from a map. |
Details about measurements in the details.
Immutable Map methods that operate on all elements.
filterKeys | Filters a map by removing all odd keys. |
Details about measurements in the details.
Immutable Map methods that operate on all elements.
filterKeys | Filters a map by removing all odd keys. |
Details about measurements in the details.
Basic HashMap methods.
contains true | Checks that a map really contains a value. |
contains false | Checks that a map really does not contain a value. |
size | Calculates the size of a map. |
Details about measurements in the details.
Basic HashMap methods.
contains true | Checks that a map really contains a value. |
contains false | Checks that a map really does not contain a value. |
size | Calculates the size of a map. |
Details about measurements in the details.
Basic HashMap methods.
put | Adds a new entry to a map. |
remove | Removes an existing entry from a map. |
clear | Removes all entries from a map. |
Details about measurements in the details.
ConcurrentHashMap methods that read from the map.
contains true | Checks that a map really contains a value. |
contains false | Checks that a map really does not contain a value. |
size | Calculates the size of a map. |
Details about measurements in the details.
ConcurrentHashMap methods that write into the map.
remove | Removes an existing entry from a map. |
put | Adds a new entry to a map. |
clear | Removes all entries from a map. |
Details about measurements in the details.
Immutable Map methods with a large map.
contains true | Checks that a map really contains a value. |
contains false | Checks that a map really does not contain a value. |
+ | Adds a new entry to a map. |
- | Removes an existing entry from a map. |
Details about measurements in the details.
Mutable Map methods that operate on a single element.
contains true | Checks that a map really contains a value. |
contains false | Checks that a map really does not contain a value. |
+= | Adds a new entry to a map. |
-= | Removes an existing entry from a map. |
Details about measurements in the details.
Mutable Map methods that operate on a single element.
contains true | Checks that a map really contains a value. |
contains false | Checks that a map really does not contain a value. |
+= | Adds a new entry to a map. |
-= | Removes an existing entry from a map. |
Details about measurements in the details.
Mutable Map methods that operate on all elements.
filterKeys | Filters a map by removing all odd keys. |
Details about measurements in the details.
Mutable Map methods that operate on all elements.
filterKeys | Filters a map by removing all odd keys. |
Details about measurements in the details.
Different examples for pattern matching and equivalent code.
match 1 | Matches the 1st pattern with a literal integer value. |
if 1 | Matches the 1st if in an if-else cascade with integer values. |
match 5 | Matches the 5th pattern with a literal integer value. |
if 5 | Matches the 5th if in an if-else cascade with integer values. |
Details about measurements in the details.