sqGnu.h
John M McIntosh
johnmci at smalltalkconsulting.com
Thu Apr 4 00:55:48 UTC 2002
You know I was thinking about the sqGnu.h changes and took a look at
the assembler (ppc). Then realized if we change to
#define BREAK goto *jumpTableR[currentBytecode]
&&
&&_250, &&_251, &&_252, &&_253, &&_254, &&_255 \
}; \
register void **jumpTableR JP_REG; \
jumpTableR = &jumpTable[0]
&&
# define JP_REG asm("25")
Then instead of resolving an address for JumpTable at each usage, we
just use the address in r25. This saves *two* instructions for each
bytecode execution which leads to numbers like so
Before
'44382801 bytecodes/sec; 1447025 sends/sec'
'44321329 bytecodes/sec; 1468736 sends/sec'
'43895747 bytecodes/sec; 1453344 sends/sec'
'44599303 bytecodes/sec; 1470034 sends/sec'
'44661549 bytecodes/sec; 1468736 sends/sec'
'44723969 bytecodes/sec; 1448284 sends/sec'
'44290657 bytecodes/sec; 1438270 sends/sec'
'44290657 bytecodes/sec; 1468736 sends/sec'
'44630404 bytecodes/sec; 1458439 sends/sec'
'44599303 bytecodes/sec; 1470034 sends/sec'
After
'46511627 bytecodes/sec; 1475247 sends/sec'
'46276211 bytecodes/sec; 1466148 sends/sec'
'46681254 bytecodes/sec; 1457161 sends/sec'
'46579330 bytecodes/sec; 1480497 sends/sec'
'46242774 bytecodes/sec; 1464858 sends/sec'
'46545454 bytecodes/sec; 1455887 sends/sec'
'46343229 bytecodes/sec; 1480497 sends/sec'
'46955245 bytecodes/sec; 1466148 sends/sec'
'45681655 bytecodes/sec; 1480497 sends/sec'
'46749452 bytecodes/sec; 1479181 sends/sec'
About 5% increase, nice for just a bit of thinking.
Also I noticed receiver and method might be useful as being made into
local vars. But I've not explored that yet.
But I need an intel fellow to see if this change makes any difference
on that register deprived architecture. Mmm wonder about the ARM chip
too?
--
--
===========================================================================
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
|