[Tutor] Sun says: Don't use Java, use Python!
alan.gauld@bt.com
alan.gauld@bt.com
Tue Feb 11 19:42:00 2003
> --My reasoning for java is that Java is much faster than perl
> or python.
Then your reasoning is flawed. Java in some situations can be
faster than Python and rarely faster than Perl. But never *much*
faster.(Unless you use a native machine code compiler...)
If you really need top speed you will need to go to C++ or C.
Best approach is write it in Python, find which bits are slow,
speed the up by better code design, then and only then rewrite
the slow bits in C.
> language. However, most of the script reads in one line at a time and
> uses the substr function in perl, which is the same as slicing in
> Python. I believe that Java would give the user a huge speed
> increase.
Why? The file I/O routines are all in the operating system regardless
of which language and ultimately the file exists as magnetic particles
on a mechanical disk being read by an electro-magnet!
> However, this thread originally asserted that java was *not* that much
> faster. In which case, no need to learn and struggle with java!
If you were doing sophisticated math modelling Java might work for you
but in this case I doubt you'd see more than 10-20% improvement, if that.
Alan G