Slight GCD optimization

Правка en2, от yoshi_avx, 2026-04-17 02:58:29

Preparing a lookup table in binary GCD can be somewhat effective if the inputs are small. I've seen a 30% time reduction with a 512x512 table (which consumes almost no memory and time) for inputs less than $$$2\times10^9$$$. It scales quite linearly with the log.

Code

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский yoshi_avx 2026-04-17 02:58:29 7 Tiny change: '\n int_type u_minus_v' -> '\n uint32_t u_minus_v'
en1 Английский yoshi_avx 2026-04-17 02:57:23 900 Initial revision (published)