utf8_to_string: use local variables Due to C aliasing rules, the compiler has to reload the string pointer and length in every iteration. Use local variables to make the generated code better. This new version of utf8_to_string is significantly faster than the previous 8.1 baseline: utf8/code.pike#decode_7bit | 1.8 G 2.5 % | 24.2 G 3.5 % | utf8/code.pike#decode_8bit | 350.0 M 1.8 % | 552.2 M 1.1 % | utf8/code.pike#decode_arabic | 325.7 M 0.8 % | 438.0 M 1.0 % | utf8/code.pike#decode_bulgarian | 321.8 M 0.9 % | 378.8 M 2.2 % | utf8/code.pike#decode_estonian | 375.6 M 1.1 % | 503.0 M 0.9 % | utf8/code.pike#decode_hebrew | 325.8 M 0.8 % | 438.8 M 0.9 % | utf8/code.pike#decode_japanese | 391.3 M 1.9 % | 517.5 M 1.8 % | utf8/code.pike#decode_polish | 371.9 M 0.9 % | 583.2 M 3.8 % | utf8/code.pike#decode_thai | 377.8 M 0.8 % | 510.6 M 1.0 % | utf8/code.pike#decode_yiddish | 326.2 M 1.1 % | 443.3 M 0.7 % | This are the results on my i7.