0

I'm new in Python. After some searching, I've found that PyPy has great performance but it comes with a price. It use too much memory.

What I'm looking for in Python is performance with smallest possible footprint.

How about CPython?

(CPython benchmark in shootout.alioth.debian.org has been removed. Some people say CPython has small footprint, but how small is that?)

mesen jait
  • 29
  • 3
  • What kind of tasks do you need to perform? What size is the data you are dealing with? What amount of memory counts as a small memory footprint? Answer these and you will get better answers. – Steven Rumbalski Apr 07 '11 at 15:58
  • 1
    You say "What I'm looking for in Python is performance with smallest possible footprint." Are you sure you want Python? I use Python because it's a great language with good enough performance and memory characteristics. If I wanted pure performance with the smallest possible memory footprint I'd use another language. – Steven Rumbalski Apr 07 '11 at 16:00
  • FWIW, I have gotten a stripped down version of Python to run an embedded Linux running on a webcam. It's possible but Python was not originally designed for that kind of thing. – Noufal Ibrahim Apr 08 '11 at 06:49

2 Answers2

2

When people talk about "Python" usually this refers to CPython, PyPy is a Python implementation whose goal is to improve performance and offers a JIT compiler that improves performance.

If you are worrying about performance, Cpython is fine tuned very well. Most of the time the slowness you would get would be from the algorithm used, that's where you get your hands dirty ;).

If for some reason you had critical part of your code that needed that extra push, you can use Cython to extend you program, but that is rarely needed.

As a wrap up, it doesn't matter which implementation you use, a lot of great stuff is made using python so i don't think you would have problem with " Performance ", just get into it you wont regret it .

P2bM
  • 1,038
  • 6
  • 9
2

I would recommend PyMite - http://wiki.python.org/moin/PyMite and http://code.google.com/p/python-on-a-chip/ designed to run on embedded devices so it's got to be with a small footprint.

Noufal Ibrahim
  • 71,383
  • 13
  • 135
  • 169