Skip to content

get: return faster if key is not present#5

Open
Kikobeats wants to merge 1 commit into
dominictarr:masterfrom
Kikobeats:patch-1
Open

get: return faster if key is not present#5
Kikobeats wants to merge 1 commit into
dominictarr:masterfrom
Kikobeats:patch-1

Conversation

@Kikobeats

@Kikobeats Kikobeats commented Dec 25, 2016

Copy link
Copy Markdown
Collaborator

before:

name, set, get1, update, get2, evict
hashlru, 7692, 9091, 6667, 7143, 4167
lru-cache, 408, 1563, 840, 2326, 420
lru, 2174, 4348, 4000, 4545, 13

after

name, set, get1, update, get2, evict
hashlru, 8333, 10000, 8333, 10000, 6250
lru-cache, 452, 1695, 794, 2128, 382
lru, 1205, 3704, 3846, 4167, 13

@davidmarkclements

Copy link
Copy Markdown
Collaborator

hi @Kikobeats can you demonstrate this faster using the lru benchmark? (https://github.com/dominictarr/bench-lru)

@Kikobeats

Copy link
Copy Markdown
Collaborator Author

yes, my local benchmarks looks faster because it exists early

@dominictarr

Copy link
Copy Markdown
Owner

@Kikobeats show us the results please!

@Kikobeats

Copy link
Copy Markdown
Collaborator Author

added! 💃

@dominictarr

Copy link
Copy Markdown
Owner

@Kikobeats added where?

@Kikobeats

Copy link
Copy Markdown
Collaborator Author

@dominictarr ops, in the first comment.

@davidmarkclements

Copy link
Copy Markdown
Collaborator

@Kikobeats in terms of the benchmark code - did you modify it all? If so could you share the benchmark code somewhere too? (a gist would be fine)

@dominictarr

Copy link
Copy Markdown
Owner

my hunch is that this that difference is a fluke, because you have only added extra code.
I suggest we delay merging this until we have a benchmark script that can show statistical significance of results.

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.

3 participants