Skip to content

add string-based benchmarks#12

Merged
kibertoad merged 1 commit intokibertoad:masterfrom
gurgunday:PR
Jan 2, 2024
Merged

add string-based benchmarks#12
kibertoad merged 1 commit intokibertoad:masterfrom
gurgunday:PR

Conversation

@gurgunday
Copy link
Contributor

@gurgunday gurgunday commented Dec 18, 2023

Related: kibertoad/toad-cache#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
Copy link
Contributor Author

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

@gurgunday
Copy link
Contributor Author

gurgunday commented Dec 18, 2023

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
Copy link
Owner

Thanks a lot!

@kibertoad kibertoad merged commit 42958b0 into kibertoad:master Jan 2, 2024
@gurgunday gurgunday deleted the PR branch January 3, 2024 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants