Fil Mackay added the comment:
So where do we go from here - is there enough support for this to proceed, or
vote the idea off the island :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19904
Fil Mackay added the comment:
Stefan, performance is not the principle motivator here: the intention is that
it is just sensible to support this integer type, just like supporting int64
since it is an intrinsic type supported by CPU's.
Of course any integer length could be handled
Fil Mackay added the comment:
Antoine,
No, the SIMD vector should be treated as a int128 (for eg.), not as 4 python
ints. It is the unpacking process that unpacks into 4 python ints. The two
shouldn't be confused - you definitely want to be able to treat the vector in
both states (packed
Fil Mackay added the comment:
Antoine,
I don't think register types matter here. The struct module provides
interoperability with low-level *data types* (in C and other common
languages), not CPU *registers*.
OK, see where you're coming from. I guess my thinking was such that struct
Fil Mackay added the comment:
The use case is interacting with C structures that have 128/256/512 bit
integers in them. These require correct memory alignment, and can't reliably be
hacked with multiple int64's.
These size ints come from the fact that CPU's now have registers of these
sizes
Fil Mackay added the comment:
I noticed that python 2.7 has been removed - why would this not be appropriate
for this version?
Given the current level of use of this version, I see it's inclusion as very
important - without having to be relegated to 3.x only
New submission from Fil Mackay:
I've been looking at adding 128-bit support to the struct module. Currently
only named integer types are supported, which vary in implementation. These
include:
short
int
long
long long
Depending on the platform, none may translate to 128-bit integer (the case
New submission from Fil Mackay:
This depends on struct issue #19904, and involves adding the following types:
c_int128
c_uint128
c_int256 (maybe?)
c_uint256
c_int512 (too much?)
c_uint512
After resolution of the struct issue, this implementation will become clearer.
--
components