|
|
Subscribe / Log in / New account

Progress on the Gilectomy

Progress on the Gilectomy

Posted May 25, 2017 19:56 UTC (Thu) by Sesse (subscriber, #53779)
In reply to: Progress on the Gilectomy by lhastings
Parent article: Progress on the Gilectomy

> Yes, there are non-standard extensions for both the compiler and the platform that, used together, allow TLS lookups to be only as costly as an extra pointer dereference.

Non-standard? They're in standard C11.


to post comments

Progress on the Gilectomy

Posted May 26, 2017 10:26 UTC (Fri) by ehiggs (subscriber, #90713) [Link] (5 responses)

Python is still stuck on C89 since they want to support building with Visual Studio. VS as of 2008 hadn't implemented C99[1], let alone C11, so it's 'non standard' if you constrain the definition to 'non standard for the standard being targeted'.

Microsoft claims that Visual Studio 2015 has support for C99[2] except for libraries which aren't used in C++ (e.g. tgmath.h). But again, this is C99 and not C11.

[1] https://mail.python.org/pipermail/python-dev/2008-July/08...
[2] https://msdn.microsoft.com/en-us/library/hh409293.aspx

Progress on the Gilectomy

Posted May 26, 2017 10:50 UTC (Fri) by Sesse (subscriber, #53779) [Link] (1 responses)

Well, let's restrict ourselves to a 28 year old language standard to support our fancy multicore boxes. :-)

(Visual Studio supports nearly all of C99 in recent versions; strangely enough, things have happened since 2008. They also support thread_local through C++11, or you can do #define thread_local __declspec(thread) and be done with it. Python already uses MSVC-specific constructs such as __declspec(dllexport).)

Progress on the Gilectomy

Posted May 26, 2017 12:25 UTC (Fri) by mathstuf (subscriber, #69389) [Link]

The silliness is that, for Python 2.7 at least, it uses the 2008 toolchain, but uses 2013 or so project files, so you can't just get one Visual Studio and have it work. I haven't had to build Python 3 on Windows yet, but it'd be much better if Python moved to a build generator like CMake (patches exist to do so) or the like. Meson, waf, and scons get you in a bootstrapping problem, but they'd work too otherwise.

Progress on the Gilectomy

Posted May 28, 2017 5:18 UTC (Sun) by gutworth (guest, #96497) [Link] (2 responses)

Since Python 3.6, CPython uses C99. See https://www.python.org/dev/peps/pep-0007/#id4

Progress on the Gilectomy

Posted Jun 2, 2017 3:06 UTC (Fri) by lhastings (guest, #66451) [Link] (1 responses)

Sadly the Gilectomy branch was forked before the change permitting C99 code. At this point it'd be an actively bad idea to try and catch up. I am at times tempted to modify the Gilectomy build process so GCC will permit C99-isms, but this would mean staining my soul with the dark arts of automake.

Progress on the Gilectomy

Posted Jun 2, 2017 4:26 UTC (Fri) by gutworth (guest, #96497) [Link]

CPython doesn't use automake either.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds