Re: [Python-Dev] Python 2.4, VS 2005 Profile Guided Optmization
Greg Ewing [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Joe Smith wrote: Microsoft as a general rule, does not go after people distributing products that Microsoft has labeled free, even after Microsoft no longer distributes that product. But if the licence agreement technically forbids redistribution, it doesn't seem like a good idea to rely on Microsoft turning a blind eye to that. I agree, although it seems very unlikely Microsoft would bother as they are busy enough the the pirating of the for-cost software. I was a little surprised that they did not allow verbatim duplicates of that software, expecially as it has the feel of freeware, or even shareware (the commecial versions have additional features). I would actually not be surprised if somebody could convince Microsoft to allow them to distribute these versions even after Microsoft no longer supports them. That would be the ideal situation. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python 2.4, VS 2005 Profile Guided Optmization
Joe Smith [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Neil Hodgson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Trent Nelson: I ended up playing around with Profile Guided Optimization, running ``python.exe pystones.py'' to collect call-graph data after python.exe/Python24.dll had been instrumented, then recompiling with the optimizations fed back in. It'd be an idea to build a larger body of Python code to run the profiling pass on so it doesn't just optimize the sort of code in pystone which is not very representative. Could run the test suite as it would have good coverage but would hit exceptional cases too heavily. Other compilers (Intel?) support profile directed optimization so would also benefit from such a body of code. GCC suppost profiling optimized code. Err... That was supposed to say supports profile-optimized code. The rest of the message was indeed about Profile Guided Optimization in gcc. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Python 2.4, VS 2005 Profile Guided Optmization
Hi, Has anyone else built Python with Visual Studio 2005 and played around with Profile Guided Optimization? I had to build Python from source w/ VS 2005 as I had a few .pyd's built with VS 2005 that I wanted to load; I ended up playing around with Profile Guided Optimization, running ``python.exe pystones.py'' to collect call-graph data after python.exe/Python24.dll had been instrumented, then recompiling with the optimizations fed back in. Results were interesting, an average speedup of around 33% was noticeable: ActiveState 2.4.3 python.exe: C:\Python24python.exe Lib\test\pystone.py Pystone(1.1) time for 5 passes = 0.980119 This machine benchmarks at 51014.2 pystones/second The python compiled from branches/release24-maint with VS 2005 + profile guided optimization: C:\Python24python.exe Lib\test\pystone.py Pystone(1.1) time for 5 passes = 0.73261 This machine benchmarks at 68249.2 pystones/second Is there any motivation in the Win32 Python dev camp to switch from VC6 to VS 2005? FWIW, although there were a shed-load of warnings when compiling python and pythoncore (and a lot more errors when compiling other modules), I only had to apply one patch to get it working well enough to run pystone.py. Without this patch, the VC8 CRT aborts at runtime as soon as an invalid signal is passed to signal(); which is inevitable given the current code in the initsignal() method: for (i = 1; i NSIG; i++) { void (*t)(int); t = PyOS_getsig(i); Regards, Trent. -- http://www.onresolve.com Index: signalmodule.c === --- signalmodule.c (revision 47196) +++ signalmodule.c (working copy) @@ -280,7 +280,21 @@ {NULL, NULL} /* sentinel */ }; +#define WIN32VS2005HACK +#ifdef WIN32VS2005HACK +#include stdio.h +#include stdlib.h +#include crtdbg.h +void dummy_handler(const wchar_t *exp, + const wchar_t *fn, + const wchar_t *file, + unsigned int line, + uintptr_t reserved) +{ +} +#endif + PyDoc_STRVAR(module_doc, This module provides mechanisms to use signal handlers in Python.\n\ \n\ @@ -339,6 +353,12 @@ goto finally; Py_INCREF(IntHandler); +#ifdef WIN32VS2005HACK +(void)_set_invalid_parameter_handler(dummy_handler); +_CrtSetReportMode(_CRT_ASSERT, 0); +#endif + + Handlers[0].tripped = 0; for (i = 1; i NSIG; i++) { void (*t)(int); ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python 2.4, VS 2005 Profile Guided Optmization
Trent Nelson wrote: Has anyone else built Python with Visual Studio 2005 and played around with Profile Guided Optimization? Yes, there was some work at the recent Need for Speed sprint. Python 2.5 has a PCBuild8 directory (for VS 2005) with a specific project for PGO. Results were interesting, an average speedup of around 33% was noticeable: Yes, they are. Is there any motivation in the Win32 Python dev camp to switch from VC6 to VS 2005? I think Martin decided to keep VC71 (Visual Studio .NET 2003) for another release cycle. Given the impressive results of VC8 with PGO, and the fact that Visual Studio Express 2005 is free forever, I would hope as well for the decision to be reconsidered. -- Giovanni Bajo ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python 2.4, VS 2005 Profile Guided Optmization
On Jul 23, 2006, at 4:41 PM, Giovanni Bajo wrote: I think Martin decided to keep VC71 (Visual Studio .NET 2003) for another release cycle. Given the impressive results of VC8 with PGO, and the fact that Visual Studio Express 2005 is free forever, I would hope as well for the decision to be reconsidered. Wasn't there a Free Forever 2003 edition too, which has since completely disappeared? Why do you think that MS won't stop distributing the Free Forever VS 2005 once VS 2005+1 comes out, the same way they did the 2003 one? James ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python 2.4, VS 2005 Profile Guided Optmization
Giovanni Bajo [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] that Visual Studio Express 2005 is free forever, I would hope as well for the decision to be reconsidered. But is it freely redistributable forever? Or even now? I have the 2003 toolkit sitting on my disk, but I am apparently not supposed to send it to anyone else. tjr ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python 2.4, VS 2005 Profile Guided Optmization
Trent Nelson: I ended up playing around with Profile Guided Optimization, running ``python.exe pystones.py'' to collect call-graph data after python.exe/Python24.dll had been instrumented, then recompiling with the optimizations fed back in. It'd be an idea to build a larger body of Python code to run the profiling pass on so it doesn't just optimize the sort of code in pystone which is not very representative. Could run the test suite as it would have good coverage but would hit exceptional cases too heavily. Other compilers (Intel?) support profile directed optimization so would also benefit from such a body of code. Neil ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python 2.4, VS 2005 Profile Guided Optmization
James Y Knight [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Jul 23, 2006, at 4:41 PM, Giovanni Bajo wrote: I think Martin decided to keep VC71 (Visual Studio .NET 2003) for another release cycle. Given the impressive results of VC8 with PGO, and the fact that Visual Studio Express 2005 is free forever, I would hope as well for the decision to be reconsidered. Wasn't there a Free Forever 2003 edition too, which has since completely disappeared? Why do you think that MS won't stop distributing the Free Forever VS 2005 once VS 2005+1 comes out, the same way they did the 2003 one? I am not aware of any full free ofeering based on 2003. There were ways to get the command line tools, but the GUI's were not available. Most of the freely available command line utilities are still available from microsoft if you find the correct page. I will note that according to the FAQ, Profile Guided Optimizations will not be available with Express. Because the compiler is the same, this means the tools to generate a profile are all that is missing. Express should still be able to build using the optimized profile. Microsoft as a general rule, does not go after people distributing products that Microsoft has labeled free, even after Microsoft no longer distributes that product. So the express editions will continue to be available long into the future if 2005+1 does not have a free version. (The logic behind this is that Microsoft would have a hard time explaining to a jury how somebody can pirate software that is available at no cost.) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python 2.4, VS 2005 Profile Guided Optmization
Neil Hodgson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Trent Nelson: I ended up playing around with Profile Guided Optimization, running ``python.exe pystones.py'' to collect call-graph data after python.exe/Python24.dll had been instrumented, then recompiling with the optimizations fed back in. It'd be an idea to build a larger body of Python code to run the profiling pass on so it doesn't just optimize the sort of code in pystone which is not very representative. Could run the test suite as it would have good coverage but would hit exceptional cases too heavily. Other compilers (Intel?) support profile directed optimization so would also benefit from such a body of code. GCC suppost profiling optimized code. One caveat is that the profile-enabled builds ause a GPL'd library. Not a problem for Python right now as it is GPL-compatible, but a caveat non-the-less. That does not apply to the final optimized app. Anyway the flags used are: -fprofile-generate and -fprofile-use. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python 2.4, VS 2005 Profile Guided Optmization
Joe Smith wrote: Microsoft as a general rule, does not go after people distributing products that Microsoft has labeled free, even after Microsoft no longer distributes that product. So the express editions will continue to be available long into the future if 2005+1 does not have a free version. Interesting. So people can do the same with the free 2003 version. Regards, Martin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Python 2.4, VS 2005 Profile Guided Optmization
Joe Smith wrote: Microsoft as a general rule, does not go after people distributing products that Microsoft has labeled free, even after Microsoft no longer distributes that product. But if the licence agreement technically forbids redistribution, it doesn't seem like a good idea to rely on Microsoft turning a blind eye to that. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com