@CAD97 I already created a PR (#51601) that specialized StepBy<Range<_>> and which resulted in better code generation, but it was reverted later due to #55985.
Like I wrote in that issue, I think that the solution is to simply specialize more methods so that they behave consistently.