[Python-Dev] Microsoft speedup (original) (raw)

Duncan Booth duncan@rcp.co.uk
Wed, 7 May 2003 14:30:14 +0100


I was just playing around with the compiler options using Microsoft VC6 and I see that adding the option /Ob2 speeds up pystone by about 2.5% (/Ob2 is the option to automatically inline functions where the compiler thinks it is worthwhile.)

The downside is that it increases the size of python23.dll by about 13%.

It's not a phenomenal speedup, but it should be pretty low impact if the extra size is considered a worthwhile tradeoff. I haven't checked yet with VC7, but the compiler options are the same so the effect should also be similar.

-- Duncan Booth duncan@rcp.co.uk int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3" "\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?