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
A couple of places ranges like the following 0..(end + 1) which can be expressed as 0..=end. This is generally more readable. However I noticed this can lead to larger code gen, since 0..=end has to perform a saturating add, while 0..(end + 1) can use a wrapping add.
This can negatively affect code size. E.g. when updating it in generic_levenshtein_distance I get the following binary sizes:
With 0..(end + 1)
This should be evaluated on a case by case basis and probably we should add a comment for cases where we keep the old syntax, so this is not rewritten in a future cleanup without rechecking the code gen.
The text was updated successfully, but these errors were encountered:
A couple of places ranges like the following
0..(end + 1)
which can be expressed as0..=end
. This is generally more readable. However I noticed this can lead to larger code gen, since0..=end
has to perform a saturating add, while0..(end + 1)
can use a wrapping add.This can negatively affect code size. E.g. when updating it in generic_levenshtein_distance I get the following binary sizes:
With
0..(end + 1)
With
0..=end
This should be evaluated on a case by case basis and probably we should add a comment for cases where we keep the old syntax, so this is not rewritten in a future cleanup without rechecking the code gen.
The text was updated successfully, but these errors were encountered: