bruce_deletethis_dawson at cygnus-software.com
Thu Sep 26 08:09:25 CEST 2002
Executive summary: Has the SET_LINENO removal been tested with the HAP
debugger, and wouldn't a breakpoint instruction give much larger benefits?
As a partial author of the HAP Python Debugger (available on source
forge) I read about the imminent removal of SET_LINENO with some worry.
It *sounds* like it has been done in such way to not cause debugger
problems, but I'm curious if anyone has tested HAP with 2.3.
Also, it sounds like the reason for removing SET_LINENO was to improve
the performance of Python scripts. However one of the posts on this
topic (can't find it now) suggested that the hoped for improvements had
not actually materialized.
It seems to me (from the sidelines/peanut gallery/wherever) that the
biggest performance problems in the SET_LINENO area are when debugging,
not when running free, and that therefore this optimization is targeting
the lesser problem.
The need to check for breakpoints at each line has always made Python
debugging performance poor at best. Technically the performance under
the debugger doesn't matter, and yet sometimes it does. Having just
helped complete a Python based sports game for PC, where real-time
performance was critical, I can say that the slowdown in HAP was
So, wouldn't a break-point opcode be a more substantial improvement than
removing SET_LINENO? Just bringing up that old topic again to see if it
gets any more traction :-)
P.S. For reference I include the canonical? link to the SET_LINENO
P.P.S. A breakpoint instruction would also be a boon for asserts - I'd
love to be able to stop on the assert when running under a debugger, to
see what is wrong before the stack frame unwinds.
More information about the Python-list