Skip to content
Snippets Groups Projects
Commit 72b94f94 authored by Georges Racinet's avatar Georges Racinet
Browse files

rust: rustlazyancestors.__contains__

This changeset provides a Rust implementation of
the iteration performed by lazyancestor.__contains__

It has the advantage over the Python iteration to use
the 'seen' set encapsuled into the dedicated iterator (self._containsiter),
rather than storing emitted items in another set (self._containsseen),
and hence should reduce the memory footprint.

Also, there's no need to convert intermediate emitted revisions back into
Python integers.

At this point, it would be tempting to implement the whole lazyancestor object
in Rust, but that would lead to more C wrapping code (two objects) for
little expected benefits.
parent 3570adf2
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment