This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Performance regression relative to 2.7
Type: performance Stage:
Components: Interpreter Core Versions: Python 3.6, Python 3.5
process
Status: closed Resolution: postponed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, ncoghlan, pitrou, skrah, vstinner, yselivanov
Priority: normal Keywords:

Created on 2015-06-03 14:49 by yselivanov, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
t.py yselivanov, 2015-06-03 14:49
Messages (6)
msg244754 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2015-06-03 14:49
Attached (t.py) is a random script that I stumbled upon pretty randomly on the internet -- someone used it to test different languages VMs performance.

The interesting thing is that 2.7 runs it 20-30% faster than 3.4 & 3.5 consistently.  The script does not involve any unicode data manipulation, it's mostly abount float arithmetic and function calls.
msg244755 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2015-06-03 15:01
FTR, Python 2.7 was slower until the computed gotos patch was backported.
msg244756 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2015-06-03 15:03
This is my experience, too:  Floating-point calculations are often
20-30% faster on 2.7.
msg244757 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2015-06-03 15:05
This is strange. On one of my gentoo boxes I'm having about the same performance of 2.7.9 and 3.4.3.

On macos x, 2.7.10 is faster than 3.5.x (make distclean & ./configure & make).

I don't know if I should close this issue.
msg244758 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2015-06-03 15:09
> This is strange. On one of my gentoo boxes I'm having about the same performance of 2.7.9 and 3.4.3.

As I said: the computed gotos patch improved performance between 2.7.9 and 2.7.10.

In any case, if there's no obvious course of action you can suggest, I think it's better to close this issue. We don't want to keep an issue open for each performance regression in the wild.

(also, computing the Mandelbrot set using the CPython interpreter isn't a very good use case)
msg244760 - (view) Author: Yury Selivanov (yselivanov) * (Python committer) Date: 2015-06-03 15:16
Alright.  I'm closing it, as it seems it's not obvious what's really going on here.  I'll try to profile it on my own later.

> (also, computing the Mandelbrot set using the CPython interpreter isn't a very good use case)

Antoine, well, regardless of the actual task, we shouldn't have such cases (ideally).  FWIW, using numba.jit gives a ~50x boost ;)
History
Date User Action Args
2022-04-11 14:58:17adminsetgithub: 68563
2015-06-03 15:16:16yselivanovsetstatus: open -> closed
type: performance
resolution: postponed
messages: + msg244760
2015-06-03 15:09:53pitrousetmessages: + msg244758
2015-06-03 15:05:06yselivanovsetmessages: + msg244757
2015-06-03 15:03:02skrahsetnosy: + skrah
messages: + msg244756
2015-06-03 15:01:46pitrousetmessages: + msg244755
2015-06-03 14:49:27yselivanovcreate