-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize
NSString.NSRangeToByteRange(start:length:)
Introduce `ByteOffsetCache` for calculating byte offset. By applying this, linting KeychainAccess by SwiftLint-0.5.1 is reduced from: ``` swiftlint 21.87s user 0.24s system 97% cpu 22.611 total ``` to: ``` swiftlint 16.62s user 0.24s system 97% cpu 17.362 total ``` On Instruments, `NSRangeToByteRange()` is reduced from 6579ms to 315ms on that test.
- Loading branch information
1 parent
6346b52
commit baa8a3a
Showing
1 changed file
with
62 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters