Files
swift-mirror/benchmark/single-source/StringEdits.swift
Max Moiseev 53ec0b1168 Improve StringEdits performance in absence of CharacterView
CharacterView was not Hashable, so Set could not be used as an
accumulator. String and Substring are Hashable, but using a Set as an
accumulator is still slower than first collecting all the results in an
Array and then transforming it to a Set at the end. One possible reason
why that could be the case, is that by the time conversion happens, we
already know the capacity and thus will not re-allocate and re-hash a
Set on every insertion beyong current capacity.
2017-10-05 10:43:08 -07:00

1.8 KiB