diff options
author | sebres <sebres@users.sourceforge.net> | 2019-07-23 21:43:37 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2019-07-23 21:43:37 (GMT) |
commit | cbbe46e832ec79fb9f9ccb4c7bd748c6390563ec (patch) | |
tree | ac15807b8ab5b103aa55af98ba90cecd7ba821e8 /generic/tclCmdMZ.c | |
parent | 540d4a2c3197e2ff763eea0c81e672af5fb37287 (diff) | |
download | tcl-cbbe46e832ec79fb9f9ccb4c7bd748c6390563ec.zip tcl-cbbe46e832ec79fb9f9ccb4c7bd748c6390563ec.tar.gz tcl-cbbe46e832ec79fb9f9ccb4c7bd748c6390563ec.tar.bz2 |
small amend with a comment about the optimization
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r-- | generic/tclCmdMZ.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 8a2a3c7..1cb27fc 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -4553,6 +4553,11 @@ Tcl_TimeRateObjCmd( count++; if (!direct) { /* precompiled */ rootPtr = TOP_CB(interp); + /* + * Use loop optimized TEBC call (TCL_EVAL_DISCARD_RESULT): it's a part of + * iteration, this way evaluation will be more similar to a cycle (also + * avoids extra overhead to set result to interp, etc.) + */ ((Interp *)interp)->evalFlags |= TCL_EVAL_DISCARD_RESULT; result = TclNRExecuteByteCode(interp, codePtr); result = TclNRRunCallbacks(interp, result, rootPtr); |