iziz/libPhoneNumber-iOS — pull request #19 by toblerpwn (2014-07-22 05:16:14+00:00)
Title: improve performance by ~70% when parsing large sets of phone numbers

`CTTelephonyNetworkInfo` objects were being created for every call to `parseWithPhoneCarrierRegion:error:` - but the `isoCountryCode` the library is after will _not_ change while an app lives in memory, so this is unnecessary.

This PR caches the `CTTelephonyNetworkInfo` object and re-uses it whenever `countryCodeByCarrier` is called.

Isolated performance test results parsing 93 phone numbers from my contact list:
* Before change: **126ms**
* After change: **32ms**

This is an isolated performance improvement of ~70%. (And the gains will only be more extreme the more phone numbers you parse over the lifetime of the the `sharedInstance` of `NBPhoneNumbeUtil`, because parsing each phone number now takes ~0.3ms instead of ~1.3ms.)

For more context, my entire real-world Contacts List parsing code takes about ~375ms to run from start to finish, and per above this change reduced it by ~100ms total. This improved my real-world user-facing delay by over 25%. HUGE!

**Recommend merging this change and incrementing your Cocoapods repo so others can benefit from better performance in this common use case.**