kibertoad / nodejs-benchmark-tournament

Collection of various benchmark, comparing everything Node.js-related to each other
MIT License
14 stars 2 forks source link

add string-based benchmarks #12

Closed gurgunday closed 9 months ago

gurgunday commented 10 months ago

Related: https://github.com/kibertoad/toad-cache/issues/40

Results:

{ cpu: { brand: 'M1', speed: '2.40 GHz' } }
| Node   | Option             | Msecs/op       | Ops/sec | V8                    |
| ------ | ------------------ | -------------- | ------- | --------------------- |
| 20.9.0 | toad-cache-lru-map | 1.352299 msecs | 739.481 | V8 11.3.244.8-node.16 |
| 20.9.0 | toad-cache-lru     | 1.956262 msecs | 511.179 | V8 11.3.244.8-node.16 |
gurgunday commented 10 months ago

Running it all once to make sure they're all working

gurgunday commented 10 months ago

Got this for MAX_ITEMS = 1500 and ELEMENT_COUNT = 2500, otherwise it takes a very long time on my mac:


| Node   | Option                     | Msecs/op       | Ops/sec  | V8                    |
| ------ | -------------------------- | -------------- | -------- | --------------------- |
| 20.9.0 | toad-cache-lru-map         | 0.351421 msecs | 2845.586 | V8 11.3.244.8-node.16 |
| 20.9.0 | toad-cache-lru             | 0.402154 msecs | 2486.611 | V8 11.3.244.8-node.16 |
| 20.9.0 | tiny-lru                   | 0.448448 msecs | 2229.911 | V8 11.3.244.8-node.16 |
| 20.9.0 | dataloader                 | 0.756174 msecs | 1322.447 | V8 11.3.244.8-node.16 |
| 20.9.0 | layered-loader-lru-map     | 1.639748 msecs | 609.850  | V8 11.3.244.8-node.16 |
| 20.9.0 | layered-loader-fifo-map    | 1.648546 msecs | 606.595  | V8 11.3.244.8-node.16 |
| 20.9.0 | layered-loader-lru-object  | 1.696958 msecs | 589.290  | V8 11.3.244.8-node.16 |
| 20.9.0 | layered-loader-fifo-object | 1.723914 msecs | 580.075  | V8 11.3.244.8-node.16 |
| 20.9.0 | async-cache-dedupe         | 1.898241 msecs | 526.804  | V8 11.3.244.8-node.16 |
kibertoad commented 9 months ago

Thanks a lot!