-
Notifications
You must be signed in to change notification settings - Fork 45
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
Native array is faster than this[] #5
Comments
@yzarubin there's this and quite a few other things that can be done for perf on deque. But, with the lack of maintenance on this repo I ended up rolling my own double-ended queue which well out performs this. 🙈 |
PRs welcome of course :) it has been 2-3 years so it's expected some things have been changed in v8 :P |
@petkaantonov I considered PR'ing this, but I didn't know where to start as it was different implementation and was concerned the PR would sit there and go mouldy 😄 Was helpful though seeing how you initially approached things, always looking through your source code like the stalker that I am. 🌝 |
@Salakar you should submit a PR so all the dependents can benefit :) |
@calebboyd I didn't want to be 'that guy' =] You're more than welcome to do one however |
I'm getting significantly faster performance using a native array
this.arr = [];
and replacing all instances ofthis[]
withthis.arr[]
. Running the two_million benchmark, I'm getting ~23 milllion ops/s withthis[]
vs 25-26 million ops/s usingthis.arr[]
Thoughts?
Darwin 13.4.0 x64
Node.JS 4.1.2
V8 4.5.103.35
Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz × 8
The text was updated successfully, but these errors were encountered: