You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
...and emit only one bounds check (for the initial assert!) instead of one per index/slice operation. We make heavy use of individual/slice indexing throughout the mapper, so we should use assert! judiciously wherever we can.
That being said, we should make sure that our current pattern isn't already providing this optimization, namely:
if fields.len() < 10{returnErr(FunctionError::TooShort(fields.len()));}
The text was updated successfully, but these errors were encountered:
rustc
can recognize the following pattern:...and emit only one bounds check (for the initial
assert!
) instead of one per index/slice operation. We make heavy use of individual/slice indexing throughout the mapper, so we should useassert!
judiciously wherever we can.That being said, we should make sure that our current pattern isn't already providing this optimization, namely:
The text was updated successfully, but these errors were encountered: