Closed mpizenberg closed 3 years ago
I found a bug, I am a little troubled that our existing tests did not find it, but it is fix and tested now. I also tried doubling down on only allocating the vec once, by adding a clear method to hang on to the vec once we have it. All tolled I am seeing 8% on elm, 13% on synthetic, and 2% on zule. So it looks good to me!
Woops, thanks for spotting that!
Had to fix the commit message, after merge. Sorry for the noise.
It occurred to me while reading your last PR that the unit propagation buffer follows most of the time a succession of push/pop, making it rather small during most operations. So I tried using
SmallVec
for it and I seem to be getting roughly 10% perf improvements on the elm and synthetic benchmarks. Let me know if you get the same.The one thing that's a bit annoying me is that I didn't handle the case when
pop
should make the small vec not aVec
anymore. I didn't do it both because I was lazy, and because I thought it would prevent the optimization of having that vec only allocated once (but I didn't check).