Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
Chrome 124
Linux
Desktop
one year ago
Benchmark.js
.get() only
1K/s
.has() and .get()
764/s
View exact numbers
Test name Executions per second
.get() only 1,033 Ops/sec
.has() and .get() 764 Ops/sec
Script Preparation code:
Tests: