[Python-Dev] Computed Goto dispatch for Python 2
Nick Coghlan
ncoghlan at gmail.com
Thu May 28 15:44:03 CEST 2015
On 28 May 2015 at 23:37, Nick Coghlan <ncoghlan at gmail.com> wrote:
> On 28 May 2015 at 22:00, Matthias Klose <doko at ubuntu.com> wrote:
>> On 05/28/2015 02:17 AM, Parasa, Srinivas Vamsi wrote:
>>> Hi All,
>>>
>>> This is Vamsi from Server Scripting Languages Optimization team at Intel Corporation.
>>>
>>> Would like to submit a request to enable the computed goto based dispatch in Python 2.x (which happens to be enabled by default in Python 3 given its performance benefits on a wide range of workloads). We talked about this patch with Guido and he encouraged us to submit a request on Python-dev (email conversation with Guido shown at the bottom of this email).
>>>
>>> Attached is the computed goto patch (along with instructions to run) for Python 2.7.10 (based on the patch submitted by Jeffrey Yasskin at http://bugs.python.org/issue4753). We built and tested this patch for Python 2.7.10 on a Linux machine (Ubuntu 14.04 LTS server, Intel Xeon - Haswell EP CPU with 18 cores, hyper-threading off, turbo off).
>>>
>>> Below is a summary of the performance we saw on the "grand unified python benchmarks" suite (available at https://hg.python.org/benchmarks/). We made 3 rigorous runs of the following benchmarks. In each rigorous run, a benchmark is run 100 times with and without the computed goto patch. Below we show the average performance boost for the 3 rigorous runs.
>>>
>>> Python 2.7.10 (original) vs Computed Goto performance
>>> Benchmark
>>
>> -1
>>
>> As Gregory pointed out, there are other options to build the interpreter, and we
>> are missing data how these compare with your patch.
>
> That's shifting the goal posts: suggesting that we should optimise
> Python 2 differently from the way we optimised Python 3 isn't a
> reasonable request to make in the context of a backporting proposal.
Sorry, I misread your email. I thought you were talking about the part
of Greg's email where he suggested different optimisation techniques,
but you were actually referring to the part where he requested more
detail on the compiler used and the number for gcc and clang.
*That* request I agree with.
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-Dev
mailing list