Paul Eggert wrote: > Anyway, an 18% speedup is still a speedup, so I looked into it. > GCC 4.9.0 misses a non-obvious opportunity for function inlining. I > installed a tweak (attached) that should make the inlining opportunity > obvious to compilers nowadays. On my platform this gave a 28% speedup, > i.e., a bit better than the macro-using patch would have. You are right. My compiler was too old. It was GCC 4.1.2 on CentOS 5.10. I retried it with GCC 4.4.7, and got the good performance. # Although I tried to build GCC 4.9.0, it hasn't carried out well yet. By the way, I examined the reason why it was slow on GCC 4.1.2, and I found that tr() isn't inlining without `-finline-loops' option, because `-finline-small-functions' option can be used from GCC 4.3. Although I submit the patch, it mayn't be so important. Thanks, Norihiro