[performance] Improve getting chars from 0 to 255