DescriptionImprove the performance of isWithin().
This adds a single-pass fast path function that only bails when it
encounters "." or ".." components in one path but not the other.
This brings isWithin() from about 0.008 iterations/us to about 0.0180 by
the repo's benchmark. It makes it about 11.5x faster on data provided by
@scheglov (see below), which consists of absolute paths that mostly do
not contain one another.
Data: https://github.com/dart-lang/path/issues/7#issuecomment-157856146
Closes #7
R=rnystrom@google.com
Committed: https://github.com/dart-lang/path/commit/e6b55472da7bfcfcc20db163abadfbd7689dd23c
Patch Set 1 #Patch Set 2 : remove -dev #
Total comments: 8
Messages
Total messages: 8 (2 generated)
|