1. have you verified that the input buffer has the extra 2 bytes and
that it's okay to scribble there?
2. have you run timing tests on the fully optimized code to see if it
actually saves some microseconds? Long, long ago, someone came up with
this code, presumably after doing some analysis. I've never looked at
the compiled output, so I can't answer. :)
3. you do realize that there's almost nobody left on the planet using
this, right?
On 6/18/22 05:01, Stefan Kanthak wrote:
Remove the almost duplicate code to process the last 1 or 2 input characters;
Access each input character only once, not twice;
Don't decrement 'in_len' AND increment 'in' inside the loop, one
loop counter is enough.