Skip to content

More performance improvements.#166

Merged
clalancette merged 2 commits intomasterfrom
clalancette/performance-improvements
Apr 27, 2026
Merged

More performance improvements.#166
clalancette merged 2 commits intomasterfrom
clalancette/performance-improvements

Conversation

@clalancette
Copy link
Copy Markdown
Owner

No description provided.

It is always at a fixed position (everywhere but the root
directory record), so we can just use that fact rather
than iterating.  This is admittedly small (we would have hit
the dotdot record second), but the code is easier to understand
this way too.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
Since __lt__ is called for every directory record,
we should make it as cheap as possible.  We do that
by prepending the \x00, \x01, or (artificial) \xff
to comparison names at parse/new time, and then just
using the string comparison at __lt__ time.

Signed-off-by: Chris Lalancette <clalancette@gmail.com>
@clalancette clalancette merged commit 3b82551 into master Apr 27, 2026
5 checks passed
@clalancette clalancette deleted the clalancette/performance-improvements branch April 27, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant