roundtozero

Benchmark created on


Setup

const x = 0.5

Test runner

Ready to run.

Testing in
TestOps/sec
cond
const y = x < 0 ? Math.ceil(x) : Math.floor(x)
ready
math.trunc
const y = Math.trunc(x)
ready
bitwise(but 32bit)
const y = x | 0
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.