performance and other stuff from https://github.com/schteppe/p2.js/pull/366 recreated#118
performance and other stuff from https://github.com/schteppe/p2.js/pull/366 recreated#118amytimed wants to merge 1 commit intopmndrs:masterfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Thanks for the PR! I will review this soon 🙂 |
|
Thanks again for the PR! This PR has a bit in it, so I've separated out the change for deferring addition and removal of objects while stepping into a separate commit, this is a WIP on the I made a few changes too:
Also, I've created an issue to track this and other potential improvements: #130 I'll look to get this into Regarding the other performance changes caching As for what we should do with this PR, we can either close it and create a new PR based on If you have time to do either of the above, feel free to, otherwise I can in the coming weeks! LMK if you have any questions, and thanks again |
it would definitely be helpful to do some benchmarking for that, but in general even if it isn't that much faster, it would be better practice to cache length instead of getting it every time theres also other performance changes like using |
basically, i saw schteppe#366, and then i saw this, and then i thought "wouldnt it be really cool to have both in one, typescript maintained version + the perf benefits?" and then i did that
passes all tests