> Linux/Athlon/gcc. > > Why does changing this: (DO_OP loop partially inlined) > > while (pc >= code_start && pc < code_end && *pc) { > do { > x = z->opcode_funcs; \ > y = x[*w]; \ > w = (y)(w,z); \ > } while (0); > } > > to > > x = z->opcode_funcs; > > while (pc >= code_start && pc < code_end && *pc) { > do { > y = x[*w]; \ > w = (y)(w,z); \ > } while (0); > } > > slow it down by 6%?
Perhaps x is no long considered a register. Are you compiling with -O2? compile to source (-S on gcc) and loop for that inner loop. See what is physically different. (I'm away from my test-environment at the moment) -Michael