Message45865
Logged In: YES
user_id=4771
stack_pointer isn't a register because its address is taken at two places. This is a really bad idea for optimization. Instead of &stack_pointer, we should do:
PyObject **sp = stack_pointer;
... use &sp ...
stack_pointer = sp;
I'm pretty sure this simple change along with a 'register' declaration of stack_pointer gives a good speed-up on all architectures with plenty of registers.
For PCs I've experimented with forcing one or two locals into specific registers, with the gcc syntax asm("esi"), asm("ebx"), etc. Forcing stack_pointer and next_instr gives another 3-4% of improvement.
Next step is to see if this can be done with #if's for common compilers beside gcc. |
|
Date |
User |
Action |
Args |
2007-08-23 15:37:26 | admin | link | issue943898 messages |
2007-08-23 15:37:26 | admin | create | |
|