Is Python lightweight?

GerritM gmuller at worldonline.nl
Sat Jun 7 15:44:02 EDT 2003


"kk" <kkennedy65 at yahoo.com> schreef in bericht
news:8b336527.0306061439.72d23063 at posting.google.com...
> I just read a comment to an article claiming that an application
> sucked, and the reason was because it was written in Python.  It went
> on to say that it pulls in some 40MB (I assume into memory), and
> insinuated that it was "bloat-ware". In case you really care, the
> application they were talking about is Redhat's "Up To Date" (software
> update tool).
<..snip...>

Others already pointed out the XP process monitor via the well known
CTRL-ALT-DEL.

I personally use the bloating not only for the RAM size, but also for the
source code size. I recently wrote a short article about bloating:
"Exploration of the bloating of software"
www.extra.research.philips.com/natlab/sysarch/BloatingExploredPaper.pdf
In my opinion is Python one of the many small ingredients needed to prevent
bloating: its expressiveness or high density of solving the problem helps to
get a non bloated realization.

>From many measurements which I have seen the footprint of Python is not very
large (see the language shootout site), Java was significantly larger, but
plain C is normally much smaller.

In most cases for real programs the design determines the footprint: poor
chosen data structures can consume large amounts of memory. Not
understanding the tool you use can also cause disasters: lists and
dictionaries are very powerful, but using them in the wrong way may cause
exceptional amounts of memory being used.

In www.extra.research.philips.com/natlab/sysarch/MIconceptualViewPaper.pdf
you can read the memory budgets of a commercial product based on
Objective-C, which contained also lots of Collections and Dictionaries.
Objective-C is also rather dynamic (not as much as Python), but the memory
sizes could be well managed and were only marginally (ca 10%) larger than
the more conventional C based systems.

regards Gerrit
--
www.extra.research.philips.com/natlab/sysarch/







More information about the Python-list mailing list