]> granicus.if.org Git - python/commit
Still somewhat experimental speedup. This appears to speed up the
authorGuido van Rossum <guido@python.org>
Wed, 29 Apr 1998 16:22:14 +0000 (16:22 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 29 Apr 1998 16:22:14 +0000 (16:22 +0000)
commit212643f1990a322b3cd95871df6c2401f9ba0230
tree0d7c501cf46173b59f28cd54ef4884655a594d17
parent9d1b7ae65b103525a2f28ebcb43d2c580a04d2d4
Still somewhat experimental speedup.  This appears to speed up the
most common interface to Tcl, the call() method, by maybe 20-25%.

The speedup code avoids the construction of a Tcl command string from
the argument list -- the Tcl argument list is immediately parsed back
by Tcl_Eval() into a list that is *guaranteed* (by Tcl_Merge()) to be
exactly the same list, so instead we look up the command info and call
the command function directly.  If the lookup fails, we fall back to
the old method (Tcl_Merge() + Tcl_Eval()) so we don't need to worry
about special cases like undefined commands or the occasional command
("after") that sets the info.proc pointer to NULL -- let TclEval()
deal with these.
Modules/_tkinter.c