]> git.eshelyaron.com Git - emacs.git/commit
In timefns, prefer ui mul and div
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 10 Jul 2024 08:23:31 +0000 (10:23 +0200)
committerEshel Yaron <me@eshelyaron.com>
Thu, 11 Jul 2024 14:39:48 +0000 (16:39 +0200)
commit9ebe2e057d0ea0a16c255b8811825d2410ce158a
treed86488909fadda6074a82621368e30e2e33f5496
parent502640a3ebbf6c89fe339df411367e5df26fba2f
In timefns, prefer ui mul and div

* src/timefns.c (ticks_hz_hz_ticks): If the multiplier
is a fixnum that fits in unsigned long, use mpz_mul_ui
instead of the more-expensive mpz_mul.  Similarly, if the
divisor is a fixnum that fits in unsigned long, use
mpz_fdiv_q_ui instead of mpz_fdiv_q.

(cherry picked from commit abafc6ca01444de7aad9856b4901aa82a68dff32)
src/timefns.c