# Faster large integer multiplication

**URL:** <https://discuss.python.org/t/faster-large-integer-multiplication/13300>\
**Category:** Ideas\
**Created:** [January 23, 2022, 7:03pm UTC](https://discuss.python.org/t/faster-large-integer-multiplication/13300 "2022-01-23T19:03:15Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![tim.one](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/tim.one/32/282_2.png) [@tim.one](https://discuss.python.org/u/tim.one)\
**Post date:** [January 23, 2022, 7:24pm UTC](https://discuss.python.org/t/faster-large-integer-multiplication/13300/3 "2022-01-23T19:24:27Z")

</div>

I added Karatsuba to Python two decades ago, and I’ve said I regret doing so. I would oppose _removing_ it, but it “shouldn’t have been” added to begin with.

There’s basically no end to this, GMP will always run faster in real life, with a group of numeric experts thoroughly dedicated to keeping it at the top of the heap. It’s an enormous amount of difficult code, and just doesn’t belong in core CPython. You can count the number of numeric experts contributing to CPython on a fraction of one hand’s fingers 😉.

Python users can get the benefit of their extreme efforts merely by installing the [gmpy2](https://pypi.org/project/gmpy2/) extension.

BTW, the `decimal` module implements multiplication algorithms fancier than Karatsuba, but that’s effectively leveraging an external library too.

---

_[View the full topic](https://discuss.python.org/t/faster-large-integer-multiplication/13300)._
