I've noticed that optimizer was failing to perform obvious optimizations like eliminating a check for equal slice lengths in slice[..len].copy_from_slice(&buf[..len]). Moving this code to a separate function helped. next_state may be big enough to be hard to optimize.
I've noticed that optimizer was failing to perform obvious optimizations like eliminating a check for equal slice lengths in
slice[..len].copy_from_slice(&buf[..len])
. Moving this code to a separate function helped.next_state
may be big enough to be hard to optimize.