daddyz/phonelib — pull request #23 by HerbCSO (2014-02-23 06:46:14+00:00)
Title: Performance improvements

With these changes, a real-world script to parse 50,000 phone numbers went from taking 150 seconds on my machine down to 100 seconds, i.e. about a 50% speed increase.

I ran the rspec tests and they all still pass - even when including rails. I'm not quite sure if I did that the way you intended though - I added rails, rspec-rails, sqlite3 and protected_attributes to the main Gemfile and ran rake - it then recognized that Rails was loaded and ran the extra tests.

Please let me know if you're OK with the coding style here. I hope this can be merged as-is, but I'm happy to make any changes you recommend.

Also, note that I didn't bump the version, I wasn't sure what you'd want it set to, or even if you'd want me to bump it at all.