Message391356
I note that Python already ships with some #ifdefs around SSE and the like. So, yes, we already do this sort of thing, although I think this usually uses compiler intrinsics rather than actual assembly. A quick grep shows zero .s files and only one .asm file (./Modules/_decimal/libmpdec/vcdiv64.asm) in the Python tree. Therefore it wouldn't be completely novel for Python but it's unusual.
I assume there's a completely generic platform-agnostic C implementation, for build environments where the assembly won't work, yes?
Disclaimer: I've been corresponding with Jack sporadically over the past year regarding the BLAKE3 Python API. I also think BLAKE3 is super duper cool neat-o, and I have uses for it. So I'd love to see it in Python 3.10.
One note, just to draw attention to it: the "blake3-py" module, also published by Jack, is written using the Rust implementation, which I understand is even more performant. Obviously there's no chance Python would ship that implementation. But by maintaining exact API compatibility between "blake3-py" and the "blake3" added to hashlib, this means code can use the fast one when it's available, and the built-in one when it isn't, a la CStringIO:
try:
from blake3 import blake3
except ImportError:
from hashlib import blake3 |
|
Date |
User |
Action |
Args |
2021-04-19 03:56:17 | larry | set | recipients:
+ larry, christian.heimes, Zooko.Wilcox-O'Hearn, jstasiak, oconnor663, corona10, xtreak, kmaork |
2021-04-19 03:56:17 | larry | set | messageid: <1618804577.48.0.370812426832.issue39298@roundup.psfhosted.org> |
2021-04-19 03:56:17 | larry | link | issue39298 messages |
2021-04-19 03:56:16 | larry | create | |
|