Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Pre-compile yaml file into py files #39

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

Merged
merged 9 commits into from
Dec 22, 2015
Merged

Pre-compile yaml file into py files #39

merged 9 commits into from
Dec 22, 2015

Conversation

mattrobenolt
Copy link
Member

This is a tremendous speedup vs parsing JSON

New code:

$ python -m timeit -s 'from ua_parser import user_agent_parser' 'reload(user_agent_parser)'
10000 loops, best of 3: 346 usec per loop

Old:

$ python -m timeit -s 'from ua_parser import user_agent_parser' 'reload(user_agent_parser)'
10 loops, best of 3: 151 msec per loop

This is multiple orders of magnitude faster, and even faster on slower computers.

151000 usec vs 346 usec. :)

Fixes #23 #35

mattrobenolt added a commit that referenced this pull request Dec 22, 2015
Pre-compile yaml file into py files
@mattrobenolt mattrobenolt merged commit 707a357 into master Dec 22, 2015
@mattrobenolt mattrobenolt deleted the compile branch March 18, 2016 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant