Building CPython

BartC bc at freeuk.com
Thu May 14 11:51:29 EDT 2015


On 13/05/2015 23:34, Terry Reedy wrote:
> On 5/13/2015 3:36 PM, BartC wrote:
>> I'm interested in playing with the CPython sources. I need to be able to
>> build under Windows, but don't want to use make files (which rarely work
>> properly), nor do a 6GB installation of Visual Studio Express which is
>> what seems to be needed (I'm hopeless with complicated IDEs anyway).
>
> Once installed hg or tortoisehg (I use this) and VSE are installed and
> repository cloned, are half done. At command prompt, with top directory
> of repository as current directory enter
> tools\scripts\external.bat
> Double-clicking file in Explorer does not work.
> Usually only needs to be done once per branch after x.y.0 release as
> dependencies are usually not updated for bugfix releases.
>
> Then in same directory enter
> pcbuild\python.sln
> or double click in Explorer or open VSE and open this file.
> Hit F7, wait until get line like
> ========== Build: 1 succeeded, 0 failed, 24 up-to-date, 1 skipped,
> hit F5, pin python_d to taskbar (optional, but handy), and go.

OK, the answer seems to be No then - you can't just trivially compile 
the C modules that comprise the sources with the nearest compiler to 
hand. So much for C's famous portability!

(Actually, I think you already lost me on your first line.)

That's a shame because I wanted to tinker with the main dispatcher loop 
to try and find out what exactly is making it slow. Nothing that seems 
obvious at first sight. (The comments even talk about improving branch 
prediction on certain architectures, even though the performance is a 
couple of magnitudes away from that kind of optimisation being relevant.)

Perhaps I was hoping there were some options turned on by default which, 
if disabled, would suddenly double the speed of simple benchmarks. Now I 
won't be able to find out...

-- 
Bartc




More information about the Python-list mailing list