You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but it's not performant in current raw form when we use current numpy
Speed-Center:
speed test (seconds)
Cpython-3.9
Pypy-7.3.5 3.7.10
PyPy-7.3.6 3.8.10 nightly
comment
SQLite_bro
13
85
35
seems linked to 'import' not being cached , but now SQLite-3.35.0 with math functions included, and PyPy-7.3.6 will cache imports (200x speed-up, but apparently no effect)
pydef py_sin(s):
"sinus function : example loading module, handling input/output as strings"
import math as py_math
return ("%s" % py_math.sin(s*1));
WITH RECURSIVE
cnt(x) AS (
SELECT 1
UNION ALL
SELECT x+1 FROM cnt
LIMIT 3000000
)
select sum(py_sin(x)) from cnt
importtimestart_time=time.time()
total=0foriinrange(1, 10000):
forjinrange(1, 10000):
total+=i+jprint(f"The result is {total}")
end_time=time.time()
print(f"It took {end_time-start_time:.2f} seconds to compute")
cython source wheel is compatible with PyPy, on more package, but fails to compile statsmodels extensions. so flight domain is currently constrained per:
jupyter_core needing pywin32
failing to build wheels for statsmodels, pywinpty
pyside6 wheel (on the road from Qt, but not there).
on PyPy3 side:
"import package speed-up" is only coming for 7.3.6, (to check if performance with sqlite test improves widely)
hpy talk or article at pycon 2021 is not yet available.
Hey @stonebig, what's the best place to report errors on these builds? Is it to the individual libraries? I can get matplotlib to crash the interpreter with the following script. It works with cPython but not Pypy. Changing the backend to Agg instead of the default TkAgg also works. I usually use Qt5Agg and plan to use that once Qt is integrated in.
"""Pypy crashes on plot closure."""
import unittest
#import matplotlib
#matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
class Test_plots(unittest.TestCase):
def setUp(self):
self.x = np.arange(5)
self.y = 10 * self.x
self.figs = None
def test_plotting1(self):
fig = plt.figure()
plt.plot(self.x, self.y)
fig2 = plt.figure()
plt.plot(self.y, self.x)
self.figs = [fig, fig2]
def test_plotting2(self):
fig = plt.figure()
plt.plot(self.x, self.y)
fig2 = plt.figure()
plt.plot(self.y, self.x)
self.figs = [fig, fig2]
def tearDown(self):
if self.figs is not None:
for fig in self.figs:
plt.close(fig)
if __name__ == '__main__':
unittest.main(exit=False)
You may report ithe problem on pypy with the code and crash report, asking if it's a pypy bug, a way of writing not tolerated per pypy, or an incompatibility from matplotlib or tk
Update of PyPy progress, testing on PyPy3-3.8 nightly of July 29th:
MyPy is working, if you comment the gc.set_threshold() line (purely non-functional, used to gain 4% on cPython)
Black is installable, because MyPy is now installable.
the Sqlite test is performed in 30 seconds in PyPy3-3.8 vs 85 seconds in PyPy-7.3.6 and 13 seconds in cPython (suspecting the "import" caching improvement backported from cPython3 code)
total = 0
for i in range(1, 10000):
for j in range(1, 10000):
total += i + j
print(f"The result is {total}")
end_time = time.time()
print(f"It took {end_time-start_time:.2f} seconds to compute")
Sqlite_Bro test: performance of 'import' and SQlite interactions
measures PyPy internal weaknesses reduction like 'import' not being cached
run this in interactive sqlite_bro
pydef py_sin(s):
"sinus function : example loading module, handling input/output as strings"
import math as py_math
return ("%s" % py_math.sin(s*1));
WITH RECURSIVE
cnt(x) AS (
SELECT 1
UNION ALL
SELECT x+1 FROM cnt
LIMIT 3000000
)
select sum(py_sin(x)) from cnt
On my true 4 core new PC sudoku test, PyPy-3.8 is still 2x faster then cpython-3.11, which is only 10% faster than cpython-3.10.
... so on immediate speed-up (in 1 year):
the "nogil" +" python" splitting in python-made-EASY in 4, would be the best simple move forward
PyPy may speed-up per 20% if it gets more support, while getting clother to cpython version
cpython may speed-up per 20%
hardware do promise 20% per year at this strange speed-up again years
==> so software and hardware do split the coming improvements,
but the multi-core part of hardware is still waiting cpython/PyPy to naturally/effortlessly use it and boost by 8x for the average user.
PyPy for Python-3.10 is out on june 2023, 6 month after 3.9, so back to a better 9 month cycle vs 12 for cpython.
... it's now only 18 month behind cpython.
Hpy seems to be integrate after Numpy-2.0, so 2.1
... we should have a competitive PyPy around end 2024
Uh oh!
There was an error while loading. Please reload this page.
To celebrate the arrival of PyPy on Windows 64 bit, Let see if we can build a WinPython with PyPy.
Interception course with cPython:
2022-022022-03: PyPy for Python-3.9so far:
Roadblocks or Hacks :
june?)Other:
Speed-Center:
the Nbody experiment became good in PyPy with type freezing
at CGO ’20, February 22–26, 2020, San Diego, CA, USA
Climate Impact

The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
build a0 (2021-04-19 'PyPy')
WinPython-3.7.10.0a0 with PyPy-3.7 v7.4.3
What shall work:
Areas of particular interest for testers::
Next build a1:
Included Package:
Location: https://sourceforge.net/projects/winpython/files/WinPython_3.7/3.7.10.0/alphas/
Uh oh!
There was an error while loading. Please reload this page.
speed measures
to get the same number of tabs we need to replace in SQLite_bro:
https://github.com/stonebig/sqlite_bro/blob/dcbbd810d0cea2be40c5c56d02e312be350a81dd/sqlite_bro/sqlite_bro.py#L739
if cur.description is not None:
per
if cur.description is not None and len(cur.description)>0: #pypy needs the second test
Uh oh!
There was an error while loading. Please reload this page.
VSCode does the sudoku with pypy3.7-v7.3.4-win64
Uh oh!
There was an error while loading. Please reload this page.
speed_basic.py test
Uh oh!
There was an error while loading. Please reload this page.
PyPy build a1 (2021-04-20 'SQLite-0.35.5')
change from build a0:
Areas of particular interest for testers:
Next build a2:
Included Package:
Location: https://sourceforge.net/projects/winpython/files/WinPython_3.7/3.7.10.0/alphas/
Uh oh!
There was an error while loading. Please reload this page.
PyPy build a2 (2021-04-24 'automated build')
Change from build a1:
Location: https://sourceforge.net/projects/winpython/files/WinPython_3.7/3.7.10.0/alphas/
Areas of particular interest for testers:
WinPython 3.7.10.0dotPyPy
The following packages are included in WinPython-64bit v3.7.10.0dotPyPy a2.
Tools
Python packages
looking at Cython CI, it seems Pypy-3.7 is (8m 10 s/ 5m 18s) 35% slower than Python-3.7 on this exercise ... room for improvement
Uh oh!
There was an error while loading. Please reload this page.
cython source wheel is compatible with PyPy, on more package, but fails to compile statsmodels extensions. so flight domain is currently constrained per:
on PyPy3 side:
Uh oh!
There was an error while loading. Please reload this page.
may 23rd morning status;
tp_doc
attributes after PyTypeReady? statsmodels/statsmodels#7460)Flight domain is currently constrained per:
tp_doc
attributes after PyTypeReady? statsmodels/statsmodels#7460)Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Flight domain is currently constrained per:
Uh oh!
There was an error while loading. Please reload this page.
milestone 1 "credibility" is now reached "WinPython 2021-03: PyPy-7.3.5 for Python3.7+ VSCode + Jupyterlab + Cython, on 64 bit only".
Next milestone 2 is about more natural "performance" vs cPython (as PyPy can perform, but you need often to tweak your code)
Hey @stonebig, what's the best place to report errors on these builds? Is it to the individual libraries? I can get matplotlib to crash the interpreter with the following script. It works with cPython but not Pypy. Changing the backend to Agg instead of the default TkAgg also works. I usually use Qt5Agg and plan to use that once Qt is integrated in.
You may report ithe problem on pypy with the code and crash report, asking if it's a pypy bug, a way of writing not tolerated per pypy, or an incompatibility from matplotlib or tk
Do it also on stackoverflow
hum, launched this way, it doesn't blow up with Winpython64-3.7.10.0PyPycodb4.exe
this way:

Uh oh!
There was an error while loading. Please reload this page.
Updated Flight domain seems now currently constrained per:
Uh oh!
There was an error while loading. Please reload this page.
Updated Flight domain (13% not possible packages) seems now currently constrained per:
Performance (-10x to 30x) is constrained per:
Uh oh!
There was an error while loading. Please reload this page.
Update of PyPy progress, testing on PyPy3-3.8 nightly of July 29th:
... not bad
make WinPython launchers work on base directories like "x ()y"
71f448f
Uh oh!
There was an error while loading. Please reload this page.
PyPy Nightly for Python3.8 build a0 (2021-08-12, from PyPy3-3.8 nightly of July 29th:)
Infrastructure work:
next step:
Uh oh!
There was an error while loading. Please reload this page.
Flight domain, as of August 28th, is currently constrained per:
08:51 we are down to 213 failures, 35 errors on the lib-python tests, 24 of them are test_dis and test_ast
... a little late to 'dreamed' roadmap speed, but momentum is growing
Uh oh!
There was an error while loading. Please reload this page.
Speed-Center: (2021-12-04 version of PyPy 3.8)
the Nbody experiment became good in PyPy with type freezing
at CGO ’20, February 22–26, 2020, San Diego, CA, USA
speed_bacic.py
start_time = time.time()
total = 0
for i in range(1, 10000):
for j in range(1, 10000):
total += i + j
print(f"The result is {total}")
end_time = time.time()
print(f"It took {end_time-start_time:.2f} seconds to compute")
Sqlite_Bro test: performance of 'import' and SQlite interactions
measures PyPy internal weaknesses reduction like 'import' not being cached
run this in interactive sqlite_bro
January 22nd:
February 27th, 2022:
Pyside6 wheels for PyPy v7.3 (Python 3.8 edition) appear to have been released:
https://www.qt.io/blog/qt-for-python-details-on-the-new-6.3-release
https://download.qt.io/official_releases/QtForPython/pypy/
super ! thanks for the head-up
So, as of May 2nd 2022, let say PyPy reached a Milestone:
... PyPy is keeping on its interception (and synergy) course with cPython in 2023
Uh oh!
There was an error while loading. Please reload this page.
On my true 4 core new PC sudoku test, PyPy-3.8 is still 2x faster then cpython-3.11, which is only 10% faster than cpython-3.10.
... so on immediate speed-up (in 1 year):
==> so software and hardware do split the coming improvements,
but the multi-core part of hardware is still waiting cpython/PyPy to naturally/effortlessly use it and boost by 8x for the average user.
Uh oh!
There was an error while loading. Please reload this page.
humm, as of now:
So:
PyPy for Python-3.10 is out on june 2023, 6 month after 3.9, so back to a better 9 month cycle vs 12 for cpython.
... it's now only 18 month behind cpython.
Hpy seems to be integrate after Numpy-2.0, so 2.1
... we should have a competitive PyPy around end 2024
humm, co-petition is catching-up:
the JIT expertise of PyPy may now help to challenge/improve/avoid mistakes in cpython JIT.
cpython-3.13.0a4 is out:
PyPy main idea of JIT Speed-up will be integrated via the Copy-and-patch JIT in classic cPython-3.13
Uh oh!
There was an error while loading. Please reload this page.
hummm, no perceptible speed progress with python-3.13.0a5.amd64 yet: time is 35" for sudoku_norvig_for_comparison_of_complexity.py