Test case details

Preparation Code

var numbers = []; //generate amount random numbers for (var i = 0; i < 100000; i++) { numbers[numbers.length] = Math.floor(Math.random()*100000)/10000; }

Test cases

Test #1

var test; for (var i = 0; i < 100000; i++) { test = Math.floor(numbers[i]); }

Test #2

var test; for (var i = 0; i < 100000; i++) { test = ~~ (numbers[i]); }

Test #3

var test; for (var i = 0; i < 100000; i++) { test = (numbers[i]) <<0; }

Test #4

var test; for (var i = 0; i < 100000; i++) { test = numbers[i] | 0; }