-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Performance needs some work #133
Comments
This library's ( |
Thanks for opening the ticket @nigeltao. I confirm this is sort of expected due to the sequential lookup algorithm currently in use. I'll try to allocate some time in August to switch to a more efficient lookup as mentioned in golang/go#15518 (comment) |
Added benchmarks, moved to a hash based implementation and improved performance to match that of golang.org/x/net library. See GH-133
Thanks for the work of #143 (kudos to @guliyevemil1 for contributing) performances have been drastically increased. Before:
After
@nigeltao No rush, but if you have some spare minutes, I'd appreciate your feedback whether you think I can consider this issue closed. Feel free to let me know if there's anything worth a review in the changes. |
I'd have to ask my colleague whether they're happy, but if you don't hear back from me in, say, a week from now, go ahead and close the issue. |
I can confirm that this has improved performance significantly! |
Thanks for the confirmation! |
According to this crude micro-benchmark on 12 made up domains,
github.com/weppos/publicsuffix-go
performs 460x slower thangolang.org/x/net/publicsuffix
:Program:
Output:
The text was updated successfully, but these errors were encountered: