mirror of
https://github.com/dlang/phobos.git
synced 2025-04-30 07:00:37 +03:00
![]() For find a string within a string, std.algorithm.searching.find was unnecessarily slow. The reason is it created intermediate slices. A naively written nested-for-loop implementation was a few times faster. For random access ranges (which strings are) this uses an index based algorithm, which does not need to create an intermediate slice. Speed is now comparable to the nested-for-loop implementation even in rather pathological cases. This might help with issue 9646. |
||
---|---|---|
.. | ||
comparison.d | ||
internal.d | ||
iteration.d | ||
mutation.d | ||
package.d | ||
searching.d | ||
setops.d | ||
sorting.d |