Closed yoshuawuyts closed 7 months ago
Oh, CI is failing because we're not resizing when we need to. That should be easy enough to fix, without having to hit the case we were hitting before. Not going to debug this right now. If someone wants to snipe what the fix should be, please feel free to though! - I think what's happening is that we're forgetting to give our bitvecs an initial size. Either that, or there's an off-by-one error somewhere.
Filed #175 instead, closing in favor of the reworked approach.
https://github.com/smol-rs/futures-lite/issues/93#issuecomment-2005364297 showed a performance issue with
FutureGroup
. The issue turned out to be related to thebitvec
crate performing really poorly ifresize
was called trivially. By instead guarding against calls toresize
this issue goes away entirely.This did not show up in our benchmarks because never exercised
insert
as part of the actual benchmark; we factored it out as part of the test setup. This is theoretically more "correct", but it also didn't surface the issue. We should probably consider adding end-to-end benchmarks for all of our operations too to catch any potential issues elsewhere. Especially for ourGroup
structures. Thanks!Benchmark results
Using the benchmarks authored by @notgull in this repo, running for 10.000 times (rather than 1 million):
before
after