Math.Floor or parseInt or |0 or Typecast (v4)

Revision 4 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Math.Floor
Math.floor("12.22")
ready
parseInt
parseInt("12.22", 10)
ready
|0
"12.22"|0
ready
Math.trunc
Math.trunc("12.22") //FirefoxOnly ATM
ready

Revisions

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