[Python-Dev] Python 3.5 on VC14 (original) (raw)

Steve Dower Steve.Dower at microsoft.com
Wed Jun 11 00:48:21 CEST 2014


Martin v. Löwis wrote:

Am 10.06.14 18:30, schrieb Steve Dower:

I ran a quick test with profile-guided optimization (PGO, pronounced "pogo"), which has supposedly been improved since VC9, and saw a very unscientific 20% speed improvement on pybench.py and 10% size reduction in python35.dll. I'm not sure what we used to get from VC9, but it certainly seems worth enabling provided it doesn't break anything. (Interestingly, PGO decided that only 1% of functions needed to be compiled for speed. Not sure if I can find out which ones those are but if anyone's interested I can give it a shot?) You probably ran too little Python code. See PCbuild/buildpgo.bat for what used to be part of the release process. It takes quite some time, but it rebuilt more than 1% (IIRC).

That's almost certainly the case. I didn't run anywhere near enough to call it good, though I'd only really expect the size to get worse and the speed to get better.

FWIW, I stopped using PGO for the official releases when it was demonstrated to generate bad code. In my experience, a compiler that generates bad code has lost trust "forever", so it will be hard to justify re-enabling PGO (like "but it really works this time"). I wasn't sad when I found a justification to skip the profiling, since it significantly held up the release process.

Yeah, and it seems the bad code is still there. I suspect it's actually due to optimizing for space rather than speed, and not due to PGO directly, but either way I'll be trying to get it fixed.

[EARLIER EMAIL]

By "keep around", I'd be fine with "in a subdirectory of PC". PCbuild should either switch for sure, or not switch at all. People had proposed to come up with a "PCbuildN" directory (N=10, N=14, or whatever) to maintain two build environments simultaneously; I'd be -1 on such a plan. There needs to be one official toolset to build Python X.Y with, and it needs to be either VS 2010 or VS 2014, but not both.

That's what I have planned. Right now it's in my sandbox and I've just replaced the existing PCbuild contents (rather wholesale - I took the opportunity to simplify the files, which is important to me as I spend most of my time editing them by hand rather than through VS). When/if I merge, the version in PC\VS10.0 will be exactly what was there at merge time.

Regards, Martin

And thanks, I appreciate the context and suggestions.

Cheers, Steve



More information about the Python-Dev mailing list