diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-12-13 21:16:44 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-12-13 21:16:44 (GMT) |
commit | 9eeefad066a16a6e9a3407178f7629a8cd4c0e61 (patch) | |
tree | 5c9ceeaebb47824cebaf15a43b4b469046ebd6d7 /generic/tclTomMathDecls.h | |
parent | 4cef9fbbe29e5ba76aaa7eaa7e91dd9b7d22e471 (diff) | |
download | tcl-9eeefad066a16a6e9a3407178f7629a8cd4c0e61.zip tcl-9eeefad066a16a6e9a3407178f7629a8cd4c0e61.tar.gz tcl-9eeefad066a16a6e9a3407178f7629a8cd4c0e61.tar.bz2 |
Optimize mp_mul for the case a==b
Diffstat (limited to 'generic/tclTomMathDecls.h')
-rw-r--r-- | generic/tclTomMathDecls.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/generic/tclTomMathDecls.h b/generic/tclTomMathDecls.h index f199a2a..52ac5da 100644 --- a/generic/tclTomMathDecls.h +++ b/generic/tclTomMathDecls.h @@ -740,6 +740,9 @@ extern const TclTomMathStubs *tclTomMathStubsPtr; #undef mp_isodd #define mp_iseven(a) (!mp_isodd(a)) #define mp_isodd(a) (((a)->used != 0 && (((a)->dp[0] & 1) != 0)) ? MP_YES : MP_NO) +#undef mp_sqr +#define mp_sqr(a,b) mp_mul(a,a,b) + #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT |