Improve indexing performance by using .split instead of .components

and using substrings instead of needlessly copying strings
This commit is contained in:
2024-11-14 19:33:26 +11:00
parent 4c3fb214de
commit 131807709a
2 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@ internal struct ApkRequirement: Hashable {
self.versionSpec = spec
}
init(extract: String) throws(ParseError) {
init(extract: Substring) throws(ParseError) {
var comparer: ComparatorBits = []
var dependStr = extract[...]
let nameEnd: String.Index, versionStart: String.Index