VM config managment problems...
John M McIntosh
johnmci at smalltalkconsulting.com
Wed Sep 10 05:14:24 UTC 2003
Mmm I think Ian dropped in my suggested change
#if defined(__powerpc__) || defined(PPC) || defined(_POWER) ||
defined(_IBMR2) || defined(__ppc__)
# define JUMP_TABLE_PTR ; register void **jumpTableP JP_REG;
jumpTableP= &jumpTable[0]
# define BREAK goto *jumpTableP[currentBytecode]
#else
# define JUMP_TABLE_PTR
# define BREAK goto *jumpTable[currentBytecode]
#endif
where for the powerpc it now uses the jumpTableP logic.
But just to obsolete things for him, I'll point out that this also
makes a difference for 68K machines
I think my #if also ORS against defined (__APPLE__)
because on April 5th 2002 I noted:
> # define JP_REG asm("a3")
>
> that makes the jump
> movel a3@(d7:l:4),a0
> mp a0@
>
> versus the old code which is
>
> lea _jumpTable.325,a0
> movel a0@(d7:l:4),a0
> jump a0@
>
> I think it is 8 clock cycles faster when we avoid the lea. I'd guess
> the _jumpTable.325 resolves to register+offset
>
> Note that is for each bytecode executed! So it does have an impact on
> performance.
>
> This changes bytecodes/sec
> 1,439,884. 51098 sends/sec
> to
> 1,550,387. 55080
Removal of instructions on 68K machines DOES make things faster.
Removal of instructions on
newer machines might not make a difference. Other folks INTEL and ARM
might what to check
assembler output and see what the
goto *jumpTableP[currentBytecode]
verus
goto *jumpTable[currentBytecode]
does from an assembler and performance viewpoint.
--
========================================================================
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
========================================================================
===
More information about the Squeak-dev
mailing list
|