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

Strange performance characteristics #27

Open
joepie91 opened this issue Jun 28, 2014 · 0 comments
Open

Strange performance characteristics #27

joepie91 opened this issue Jun 28, 2014 · 0 comments

Comments

@joepie91
Copy link
Owner

After implementing a much-needed optimization (pre-compiling regexes), I found that not only does pythonwhois now parse much faster in Python 2.x, it is now also significantly faster than in Python 3.x. This should not be the case. Timing results below:

Prior to optimization

2.6
Timing in default mode: 333ms avg, 152ms min, 476ms max
Timing in normalized mode: 336ms avg, 130ms min, 482ms max

2.7
Timing in default mode: 283ms avg, 101ms min, 444ms max
Timing in normalized mode: 287ms avg, 109ms min, 453ms max

3.3
Timing in default mode: 78ms avg, 4ms min, 180ms max
Timing in normalized mode: 80ms avg, 4ms min, 338ms max

After optimization

2.6
Timing in default mode: 30ms avg, 1ms min, 135ms max
Timing in normalized mode: 30ms avg, 1ms min, 132ms max

2.7
Timing in default mode: 18ms avg, 0ms min, 82ms max
Timing in normalized mode: 18ms avg, 0ms min, 84ms max

3.3
Timing in default mode: 79ms avg, 3ms min, 178ms max
Timing in normalized mode: 79ms avg, 4ms min, 178ms max

@joepie91 joepie91 self-assigned this Jun 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant