ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-list
python-list
Re: Small Python, Java comparison
by GerritM other posts by this author
Jul 12 2003 7:22PM messages near this date
Re: removing spaces from front and end of filenames | Re: [OFF TOPIC] Re: The "intellectual property" misnomer
"Dave Brueck" <dave@[...].com>  schreef in bericht
news:mailman.1057953857.30422.python-list@[...]..
<...snip...>  Java:
From the start of the design to the end of the implementation and initial
round of bug fixing took 3 weeks. An additional 2-3 weeks were spent
optimizing the code and fixing more bugs. The source code had 4700 lines in
9
files. When running, it would process an average of 1050 records per second
(where process = time to parse the file, do calculations, and insert them
into the database).
<...snip...>  Python:
Because I wasn't working on this full-time, the development was spread out
over the course of two weeks (10 working days) at an average of just over 2
hours per day (for a total of not quite 3 full days of work). The source
code
was less than 700 lines in 4 files. Most surprising to me was that it
processes an average of 1200 records per second! I had assumed that after I
got it working I'd need to spend time optimizing things to make up for Java
having a JIT compiler to speed things up, but for now I won't bother.

Both versions could be improved by splitting the log parsing/summarizing and
database work into two separate threads (watching the processes I see
periods
of high CPU usage followed by near-idle time while the database churns
away).
Currently the Java version averages 47% CPU utilization and the Python
version averages 51%.
<...snip...> 

I recently wrote a short article about bloating of software:
"Exploration of the bloating of software"
www.extra.research.philips.com/natlab/sysarch/BloatingExploredPaper.pdf
(long URL may be broken in two by e-mail reader!).
I explain a number of effects I have observed which are caused by bloating,
one of them degradation of performance. This degradation is repaired which
causes again more bloating....

I think your small sample point is a clear illustration of the fact that
appropriate technology is important. Your gain of a factor of 6-7 in loc
will translate in comparable gains in maintenance, cost and ease of
extending etcetera.

thanks for sharing your experience, regards Gerrit



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


-- 
http://mail.python.org/mailman/listinfo/python-list

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved