TLDR Web Dev · MISCELLANEOUS
OPTIMIZING A BIGNUM LIBRARY FOR FUN
Summary from the TLDR Web Dev newsletter
This author initially implemented a bignum library using base-10 digits, but it was slow. They then optimized it by switching to 30-bit digits, which improved memory efficiency and arithmetic operations. This change resulted in an 83% faster addition and a 99% faster multiplication.