gh-135532: optimize calls to `PyMem_Malloc` in SHAKE digest computation (#135744)
- Add a fast path when the digest length is 0 to avoid calling useless functions. - Directly allocate via `PyBytes_FromStringAndSize(NULL, length)` when possible.
B
Bénédikt Tran committed
d08b4b2333d28403633f9ceb86a3a5fab011d8a1
Parent: 7c43615
Committed by GitHub <noreply@github.com>
on 6/21/2025, 12:32:00 PM