summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2019-02-04 15:14:58 (GMT)
committersebres <sebres@users.sourceforge.net>2019-02-04 15:14:58 (GMT)
commit73b6b4eab6a4b0a4ecf0f0c6bcf00bd815c34dd5 (patch)
treef69279fd0c37f829a47dbf29604b2c3267847b71 /generic/tclExecute.c
parent3106f9a6955f9df9de5df5879319b6e4393ab702 (diff)
downloadtcl-73b6b4eab6a4b0a4ecf0f0c6bcf00bd815c34dd5.zip
tcl-73b6b4eab6a4b0a4ecf0f0c6bcf00bd815c34dd5.tar.gz
tcl-73b6b4eab6a4b0a4ecf0f0c6bcf00bd815c34dd5.tar.bz2
optimize WidePwrSmallExpon (exponent is <= 16), this will huge decrease assembled code on x86 (113 vs 220 instructions)
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 897e2cd..17ad0bb 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -7798,7 +7798,7 @@ FinalizeOONextFilter(
* Helper to calculate small powers of integers whose result is wide.
*/
static inline Tcl_WideInt
-WidePwrSmallExpon(Tcl_WideInt w1, Tcl_WideInt exponent) {
+WidePwrSmallExpon(Tcl_WideInt w1, long exponent) {
Tcl_WideInt wResult;
@@ -8359,7 +8359,7 @@ ExecuteExtendedBinaryMathOp(
/*
* Small powers of integers whose result is wide.
*/
- wResult = WidePwrSmallExpon(w1, w2);
+ wResult = WidePwrSmallExpon(w1, (long)w2);
WIDE_RESULT(wResult);
}