Could Python supplant Java?
Christian Tanzer
tanzer at swing.co.at
Fri Aug 23 03:01:58 EDT 2002
brueckd at tbye.com wrote:
> On Thu, 22 Aug 2002, Bo M. Maryniuck wrote:
>
> > On Wednesday 21 August 2002 21:28, James J. Besemer wrote:
> > > with one 150K LOC VC++ project I worked on I could change a few modules and
> > > rebuild in just a few seconds. In contrast, I just generated a fairly
> > > trivial 150K Python program and it took almost 3 minutes compile (on a
> > > machine 4X faster than I used for that C++ project).
> >
> > What you mean by "compile"? Python is an interpterer as Java or Perl...
>
> I believe he meant that it took 3 minutes to generate all the .pyc files.
I think James compared apples and oranges by comparing a single 150k
LOC file of Python to lots of little C++ modules. Python is rather
slow when compiling huge .py Files.
Ever tried feeding VC++ with a single 150k LOC C++ file, James? I
remember well an application where a 11k LOC file generated by byacc
would take far longer to compile than all the other 193 files
(containing 60 kLOC) combined.
> This is misleading though because in Python you almost never need 'rebuild
> all' functionality (exceptions include generating .pyc's for
> distribution/packaging or generating .pyc's because you're installing
> Python as root and others won't have write access to those directories).
>
> In a statically typed language the change to source code in one file can
> trigger the recompile of many other files (e.g. change a header file), so
> the time recquired to compile and link can be significant. In a
> dynamically typed language like Python, however, only the files that you
> actually change need to be recompiled.
All true. But then it doesn't really matter as James obviously doesn't
know what he's talking about, anyway.
--
Christian Tanzer tanzer at swing.co.at
Glasauergasse 32 Tel: +43 1 876 62 36
A-1130 Vienna, Austria Fax: +43 1 877 66 92
More information about the Python-list
mailing list