A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2009-July/090852.html below:

[Python-Dev] mingw32 and gc-header weirdness

[Python-Dev] mingw32 and gc-header weirdness [Python-Dev] mingw32 and gc-header weirdnessNeil Hodgson nyamatongwe at gmail.com
Sat Jul 25 16:11:30 CEST 2009
Martin v. Löwis:

> I propose to add another (regular) double into the union.

   Adding a regular double as a second dummy gives the same sizes and
alignments with Mingw or MSVC as the original definition with MSVC:

typedef union _gc_head {
       struct {
               union _gc_head *gc_next;
               union _gc_head *gc_prev;
               Py_ssize_t gc_refs;
       } gc;
       long double dummy;  /* force worst-case alignment */
       double dummy2;  /* in case long double doesn't trigger worst-case */
} PyGC_Head;

   In regard to alignment penalties, a simple copy loop for doubles
runs about 20% slower when misaligned on an my AMD processor. Other
x86 processors can be much worse. As much as 2 to 3.25 times according
to
http://msdn.microsoft.com/en-us/library/aa290049%28VS.71%29.aspx

   Neil
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4