Tests:
-
numeric keys
-
string keys
-
string keys, with key caching (n.toString())
-
string keys, with key caching ("" + n)
Rendered benchmark preparation results:
Latest run results:
Run details: (Test run date:
one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Chrome 135 on Windows
View result in a separate tab
string keys, with key caching ("" + n)
57K/s
string keys, with key caching (n.toString())
48K/s
View exact numbers
| Test name |
Executions per second |
|
✓
numeric keys
|
107,312 Ops/sec |
|
string keys, with key caching ("" + n)
|
57,493 Ops/sec |
|
string keys, with key caching (n.toString())
|
48,176 Ops/sec |
|
string keys
|
35,180 Ops/sec |
Do you really want to delete benchmark?