A free lunch

The Python community is about to offer us a free lunch. A new compliant interpreter, pypy, is already 4.3x faster than cPython, and getting faster everyday. It shows that there is not conceptual reason why high-level dynamic languages should be slow.

For MyHDL, an HDL implemented as a Python library, the results are even more spectacular: my benchmarks run

8-20x faster on pypy. In a single strike, this makes MyHDL simulation performance competitive with Verilog/VHDL.

formatting link

Jan

--
Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com
     Python as a HDL: http://www.myhdl.org
 Click to see the full signature
Reply to
Jan Decaluwe
Loading thread data ...

Impressive. Do the pypy team have your code to use as a Version Test ?

Reply to
Jim Granville

Did you even try this with your program?

formatting link

Sounds more than one group is speeding up Python.

--
Failure does not prove something is impossible, failure simply
indicates you are not using the right tools...
 Click to see the full signature
Reply to
Nico Coesel

pscyo is an interesting project, and I've used it to speed up Python code. However, the project has been basically dead for 5 years (other than some updated builds for newer python releases on non-Linux platforms), since the guy behind it moved his effort over to the more flexible and future-oriented pypy project. In particular, pscyo is limited to 32-bit x86 cpus, while pypy is aimed at a range of targets - including 64-bit amd64.

Reply to
David Brown

In addition, psycho doesn't accelerate generators, which are the name of the game in MyHDL. However, through psycho I got to track Armin Rigo as someone who can do miracles :-)

-- Jan Decaluwe - Resources bvba -

formatting link
Python as a HDL:
formatting link
VHDL development, the modern way:
formatting link
World-class digital design:
formatting link

Reply to
Jan Decaluwe

I don't think they use it now, but they are very aware of the project, and it's all open source, so I'll leave that to their good judgement.

With MyHDL, I found one bug in PyPy 1.5 which has been fixed and added to the PyPy regression test suite, which must be very broad by now.

Jan

--
Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com
     Python as a HDL: http://www.myhdl.org
 Click to see the full signature
Reply to
Jan Decaluwe

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.