Tests:
  • trunc

    AخA
     
    Math.trunc(13.37123123 * 1_000_000) / 1_000_000
    Math.trunc(13.67123123 * 1_000_000) / 1_000_000
  • round

     
    Math.round(13.37123123, 6)
    Math.round(13.67123123, 6)
  • floor

     
    Math.floor(13.37123123, 6)
    Math.floor(13.67123123, 6)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    trunc
    round
    floor

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Chrome 133 on Windows
View result in a separate tab
Test name Executions per second
trunc 241060112.0 Ops/sec
round 258677504.0 Ops/sec
floor 243322448.0 Ops/sec