-
Notifications
You must be signed in to change notification settings - Fork 3
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
Improve performance #52
base: master
Are you sure you want to change the base?
Conversation
Note that we are not using this module in Fastify right now, but we switched back to upstream. I'm ok to switch again if this gives an improvement. |
The thing is that we have already improvements because our forwarded fork is significantly faster. So we should have switched long time ago. :D I am currently working on improving the performance for checking if the ip is trustable. |
Can you make the switch again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
addr[1] === ':' | ||
) { | ||
if ( | ||
addr[2] === 'f' && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is symbol-by-symbol check faster than resolving slice and comparing it as a whole?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from my experience: yes.
sry, I have to investigate something. |
Currently working on the performance of this package.
There are still some perf gains to get.
Checklist
npm run test
andnpm run benchmark
and the Code of conduct