Re: Okay, hardware gurus....

2001-10-03 Thread Bryan C . Warnock
On Wednesday 03 October 2001 10:56 am, Michael Maraist wrote: > > > 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%? > > > > Perh

Re: Okay, hardware gurus....

2001-10-03 Thread Dan Sugalski
At 10:56 AM 10/3/2001 -0400, Michael Maraist wrote: >If you did you -O2 it shouldn't matter though, because the code would be >reordered either way. Counting on gcc, or any compiler, to reorder in ways you expect is always a dicey thing. :) Just because things get reordered doesn't mean they ge

Re: Okay, hardware gurus....

2001-10-03 Thread Michael Maraist
> > 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-

Re: Okay, hardware gurus....

2001-10-03 Thread Michael Maraist
> 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 >=

Re: Okay, hardware gurus....

2001-10-03 Thread Bryan C . Warnock
On Wednesday 03 October 2001 10:43 am, Simon Cozens wrote: > On Wed, Oct 03, 2001 at 10:45:08AM -0400, Bryan C. Warnock wrote: > > while (pc >= code_start && pc < code_end && *pc) { > > do { > > x = z->opcode_funcs; \ > > y = x[*w]; \ > >w = (y)(w,z); \ > > } while

Re: Okay, hardware gurus....

2001-10-03 Thread Simon Cozens
On Wed, Oct 03, 2001 at 10:45:08AM -0400, Bryan C. Warnock wrote: > 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; The optimizer should hoist

Okay, hardware gurus....

2001-10-03 Thread Bryan C . Warnock
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_en