MCPcopy Create free account
hub / github.com/eshirazi/python-with-braces / k_lopsided_mul

Function k_lopsided_mul

Objects/longobject.c:2919–2971  ·  view source on GitHub ↗

b has at least twice the digits of a, and a is big enough that Karatsuba * would pay off *if* the inputs had balanced sizes. View b as a sequence * of slices, each with a->ob_size digits, and multiply the slices by a, * one at a time. This gives k_mul balanced inputs to work with, and is * also cache-friendly (we compute one double-width slice of the result * at a time, then move on, never

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

k_mulFunction · 0.85

Calls 4

_PyLong_NewFunction · 0.85
k_mulFunction · 0.85
v_iaddFunction · 0.85
long_normalizeFunction · 0.85

Tested by

no test coverage detected