Open scottmcm opened 1 month ago
I tried adding #[inline]
to the default step methods just in case that was relevant, but it looks like it wasn't.
Maybe something to do with specialization since I think this ends up at
EDIT: Also tried increasing
and that wasn't enough either.
this fixes it, but also breaks the exponential growth test, so needs something smarter...
let inline_limit = match self.history.len() {
0 => usize::MAX,
- 1..=TOP_DOWN_DEPTH_LIMIT => 1,
+ 1..=TOP_DOWN_DEPTH_LIMIT => 3,
_ => return,
};
If you compile this to optimized MIR:
https://rust.godbolt.org/z/zsh6b6Y8n
You'll see that it still contains a call to
forward_unchecked
:That's pretty unfortunate, because
forward_unchecked(a, 1)
is justAddUnchecked(a, 1)
, a single MIR operator.