From 73b6b4eab6a4b0a4ecf0f0c6bcf00bd815c34dd5 Mon Sep 17 00:00:00 2001 From: sebres Date: Mon, 4 Feb 2019 15:14:58 +0000 Subject: optimize WidePwrSmallExpon (exponent is <= 16), this will huge decrease assembled code on x86 (113 vs 220 instructions) --- generic/tclExecute.c | 4 ++-- 1 file 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); } -- cgit v0.12