Script Preparation code:
Tests:
  • Math.random().toString(36).slice(-5)

  • (+new Date).toString(36).slice(-5)

  • btoa(Math.random()).slice(0, 5)

  • btoa(+new Date).slice(-7, -2)

  • btoa(+new Date).substr(-7, 5)

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Math.random().toString(36).slice(-5)
    (+new Date).toString(36).slice(-5)
    btoa(Math.random()).slice(0, 5)
    btoa(+new Date).slice(-7, -2)
    btoa(+new Date).substr(-7, 5)

    Fastest: N/A

    Slowest: N/A

Latest run results:

No previous run results

This benchmark does not have any results yet. Be the first one to run it!