Hello hackers, Attached patch introduces an optimization of mul_var() in numeric.c, targeting cases where the multiplicands consist of only one or two base-NBASE digits. Such small multiplicands can fit into an int64 and thus be computed directly, resulting in a significant performance improvement, between 26% - 34% benchmarked on Intel Core i9-14900K.
This optimization is similar to commit d1b307eef2, that also targeted one and two base-NBASE digit operands, but optimized div_var(). Regards, Joel
0001-optimize-numeric-mul_var-small-factors.patch
Description: Binary data