https://github.com/gorhill/obj-vs-set-vs-map
Just a benchmark to measure performance of Set(), Map() versus Object.create(null)
https://github.com/gorhill/obj-vs-set-vs-map
Last synced: 6 months ago
JSON representation
Just a benchmark to measure performance of Set(), Map() versus Object.create(null)
- Host: GitHub
- URL: https://github.com/gorhill/obj-vs-set-vs-map
- Owner: gorhill
- License: unlicense
- Created: 2016-09-04T23:09:13.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-05T16:28:44.000Z (about 8 years ago)
- Last Synced: 2025-03-12T21:49:09.953Z (10 months ago)
- Language: HTML
- Size: 623 KB
- Stars: 14
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# obj-vs-set-vs-map
Just a benchmark to measure performance of `Set()`, `Map()` versus `Object.create(null)`.
Run the benchmark for your current browser: .
### Example of results
Chromium v51:
- Adding items:
- `Obj set() x 27.38 ops/sec ±6.75% (50 runs sampled)`
- `Set set() x 83.31 ops/sec ±3.47% (70 runs sampled)`
- `Map set() x 68.24 ops/sec ±3.12% (69 runs sampled)`
- Looking up items (80% misses):
- `Obj get() x 10,516 ops/sec ±0.30% (93 runs sampled)`
- `Set get() x 17,429 ops/sec ±0.51% (94 runs sampled)`
- `Map get() x 15,462 ops/sec ±0.35% (96 runs sampled)`