| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
It is now 2-3 times faster if the user has permissions.
|
Benchmark: # test.sh
echo "relative" && python -m timeit -s "import before.posixpath" "before.posixpath.ismount('.')" && python -m timeit -s "import after.posixpath" "after.posixpath.ismount('.')"
echo "absolute" && python -m timeit -s "import before.posixpath" "before.posixpath.ismount('/Volumes/2GB_001')" && python -m timeit -s "import after.posixpath" "after.posixpath.ismount('/Volumes/2GB_001')"
echo "no permission" && python -m timeit -s "import before.posixpath" "before.posixpath.ismount('/Users/wannes/path-picker/permission-test/dirs/666')" && python -m timeit -s "import after.posixpath" "after.posixpath.ismount('/Users/wannes/path-picker/permission-test/dirs/666')"relative
10000 loops, best of 5: 27.3 usec per loop # before
50000 loops, best of 5: 8.25 usec per loop # after
# -> 3.29x faster
absolute
20000 loops, best of 5: 19.7 usec per loop # before
50000 loops, best of 5: 8.21 usec per loop # after
# -> 2.40x faster
no permission
5000 loops, best of 5: 41.2 usec per loop # before
5000 loops, best of 5: 48.5 usec per loop # after
# -> 1.18x slower
|
Sorry, something went wrong.
|
@erlend-aasland, could you review this? |
Sorry, something went wrong.
|
Looks good to me, but I'm not sure if it worth the added maintenance cost to optimise this. I mean, how often is the ismount API used? I'll leave it for Serhiy to decide. |
Sorry, something went wrong.
It is now 2-3 times faster if the user has permissions.
…e stability) readline completer delimiters on macOS libedit must NOT include \n (newline). When newline is a delimiter and the prompt contains embedded newlines (which 26+ input locations in hate_crack do), libedit's cursor position tracking becomes unstable during completion, causing backspace to be ignored or behave unexpectedly. Removing \n from readline.set_completer_delims() in both attacks.py and main.py restores stable backspace behavior while maintaining tab completion. Fixes: Random inability to backspace in menu prompts Ref: python/cpython#117447 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
It is now 2-3 times faster if the user has permissions.