python performance: PYPY 2.6.1

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
Massa
Space Krill
Posts: 5
Joined: Tue Sep 01, 2015 12:33 pm

python performance: PYPY 2.6.1

#1 Post by Massa »

Hi,

Has anyone tried implementing the latest pypy (python jitting compiler) as a drop-in replacement for cpython? (2.6.1 -> 2.7.10)

It's reached a mature and stable stage nowadays - for compute intensive tasks it's easily 6x faster and as long as certain external modules are not used, it works out of the box.

A definite win-win for weaker devices, like the arm ones for example. Probably not applicable here but with many nested calls it even saves memory compared to cpython. (it needs about 50MB more upfront however)

Cheers!

(one game I'd tested on arm using a lua equivalent (luajit) is called ToME)
Last edited by Massa on Fri Sep 25, 2015 12:43 pm, edited 1 time in total.

User avatar
Cjkjvfnby
AI Contributor
Posts: 539
Joined: Tue Jun 24, 2014 9:55 pm

Re: PYPY 2.6.1

#2 Post by Cjkjvfnby »

Massa wrote:Hi,

Has anyone tried implementing the latest pypy (python jitting compiler) as a drop-in replacement for cpython? (2.6.1 -> 2.7.10)

It's reached a mature and stable stage nowadays - for compute intensive tasks it's easily 6x faster and as long as certain external modules are not used, it works out of the box.

A definite win-win for weaker devices, like the arm ones for example. Probably not applicable here but with many nested calls it even saves memory compared to cpython. (it needs about 50MB more upfront however)

Cheers!

(one game I'd tested on arm using a lua equivalent (luajit) is called ToME)
We use boost python (C++ binding). I did not see any info about support it in PYPY.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Massa
Space Krill
Posts: 5
Joined: Tue Sep 01, 2015 12:33 pm

Re: PYPY 2.6.1

#3 Post by Massa »

Cjkjvfnby wrote: We use boost python (C++ binding). I did not see any info about support it in PYPY.
Judging by this thread it could be made to compile and work already over 18 months ago albeit with stability problems:

http://grokbase.com/t/python/pypy-dev/1 ... ypy-status

(the silly comment about pyd is not mine obviously!)

Post Reply