summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2019-07-23 21:43:37 (GMT)
committersebres <sebres@users.sourceforge.net>2019-07-23 21:43:37 (GMT)
commitcbbe46e832ec79fb9f9ccb4c7bd748c6390563ec (patch)
treeac15807b8ab5b103aa55af98ba90cecd7ba821e8 /generic/tclCmdMZ.c
parent540d4a2c3197e2ff763eea0c81e672af5fb37287 (diff)
downloadtcl-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.c5
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);