Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please re-test tiny-lru #4

Closed
avoidwork opened this issue Jan 6, 2017 · 2 comments
Closed

Please re-test tiny-lru #4

avoidwork opened this issue Jan 6, 2017 · 2 comments

Comments

@avoidwork
Copy link
Collaborator

avoidwork commented Jan 6, 2017

Hi,

I noticed this benchmark & fixed tiny-lru as a result. Thanks for making it! Please re-test the module, it's roughly 150x faster for eviction* on my 2014 macbook air, and 30x faster on my i5-6500 desktop.

This is a screenshot of the HEAD of this repo with only tiny-lru running:

screen shot 2017-01-05 at 9 14 39 pm

@dominictarr
Copy link
Owner

Great! what change did you make?

my computer broke (am on phone rn) so will add you as collab so you can merge and update!

@avoidwork
Copy link
Collaborator Author

Hi,

First change was to minimize new object creation which is why there was an overall increase in ops/s. I then did a little trial/error sans irhydra2 (was having trouble with node 7) to determine the evict code path from set was doing a few too many ops on a single property which was most likely causing the JIT to deop & drop to a "slow zone" / interpreted execution.

I ended up erasing a couple of lines of code, and rearranging some ops to do less work overall 👍

avoidwork added a commit that referenced this issue Jan 8, 2017
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

No branches or pull requests

2 participants