-
Notifications
You must be signed in to change notification settings - Fork 107
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
Implement bulk generation module #17
base: master
Are you sure you want to change the base?
Conversation
I needed to generate several million names for a sample dataset, and looking up names out of the file every time was very time consuming. I left the original logic untouched, as it's the best approach for a quick, one-off lookup. I've added a separate module, 'names.bulk' which offers the same interface, but caches the entire file in memory and picks names with a binary search instead of a scan.
I'm a bit perplexed. The Travis-CI build seems to be failing on Python 3.2 on something that has nothing to do with my changes. It looks like the coverage package is failing on Python 3.2 |
@treyhunner this looks like a great PR |
So I failed to bother to look at PRs before writing my own ([WIP]) in #23 which is 'similar' to this. Here at least a bisect is used but I think the |
@treyhunner Any chance we could approve this PR? This looks like a big performance boost on apps that call the library repeatedly. Anything I could do to help if QA needed? |
I needed to generate several million names for a sample dataset,
and looking up names out of the file every time was very time
consuming.
I left the original logic untouched, as it's the best approach for
a quick, one-off lookup. I've added a separate module, 'names.bulk'
which offers the same interface, but caches the entire file in memory
and picks names with a binary search instead of a scan.
Should resolve: #3