Script Preparation code:
Tests:
  • Classic 16

  • Mul shf 16

  • Imul shf 16

  • Classic int

  • Mul shf bigint

  • Mul shf 32

  • java nextInt16(bound)

  • java nextInt32(bound)

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Classic 16
    Mul shf 16
    Imul shf 16
    Classic int
    Mul shf bigint
    Mul shf 32
    java nextInt16(bound)
    java nextInt32(bound)

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 10 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Chrome 137 on Windows
View result in a separate tab
Test name Executions per second
Classic 16 3156994.5 Ops/sec
Mul shf 16 3150879.8 Ops/sec
Imul shf 16 3149800.8 Ops/sec
Classic int 3133589.8 Ops/sec
Mul shf bigint 2397238.2 Ops/sec
Mul shf 32 1395642.2 Ops/sec
java nextInt16(bound) 2981598.5 Ops/sec
java nextInt32(bound) 3113806.0 Ops/sec