Rewrite the multi cartesian product iterator#603
Rewrite the multi cartesian product iterator#603JakobDegen wants to merge 1 commit intorust-itertools:masterfrom
Conversation
1a1d6cc to
e49b4d2
Compare
|
Hi there, this could be a great PR! Apparently, it currently uses If you touch the code anyway, I think we'd greatly appreciate if you could split up the PR into smaller commits (just to simplify the review (as you probably saw, there's currently not much going on in this crate, so every simplification to the reviews is more than welcome)). Of course, you do not have to do this, but it would probably make review a bit easier. If you do so, here are some suggestions to factor out into separate commits:
|
e49b4d2 to
ef76312
Compare
|
I've fixed the usage of |
…fix a bug. Rebased, fix a `;` that should have been `,`. Fix the test `correct_empty_multi_product` to ensure that is returns None after the first and only empty vector.
ef76312 to
2e2a019
Compare
|
All I did for now is: drop the "fmt" commit, rebase resolving "fmt" changes and a |
|
@jswrenn @phimuemue This rewrite intend to fix a long-time bug but I think I could fuse the iterator as well with this PR by changing the The specialization test is currently ignored as it fails because
|
This PR rewrites the multi cartesian product iterator. The original goal was to fix #337 ; however, there was no nice way of storing the state associated with that (besides just adding a bool that got checked everywhere). The new implementation fixes that bug, is slightly faster on benchmarks (5% and 0%), and hopefully easier to maintain since it is simpler.