[Python-Dev] ctypes is in SVN now.
theller at python.net
Thu Mar 9 21:50:31 CET 2006
Tim Peters wrote:
> [Thomas Heller]
>> And I never had tried it before on a sparc machine - all the intel and ppc processors
>> seem to have no problems with it.
> Pentiums don't enforce "natural" alignment restrictions, but run much
> slower on unaligned access (varying by specific chip model, and
> generally more heavily penalized as time goes on). In the good old
> days, Pentium was one of dozens of competing architectures, and was
> the oddball in catering to unaligned access. Now it's eternal
> "backward compatibility" with an early implementation accident. Most
> other architectures never catered to unaligned access, or did so only
> at the cost of generating an interrupt so that kernel-mode software
> could fake unaligned access. Bottom line is that unaligned access
> isn't portable and never was, and even on architectures where "it
> works" it can be extremely expensive to use it.
I'm old enough to know this, but thanks anyway. I'm not so speed paranoid
to care about these nanoseconds, maybe timeit can tell if there's a measurable
More information about the Python-Dev