http://qs1969.pair.com?node_id=1195712


in reply to Re: Can Perl do anything Java can do?
in thread Can Perl do anything Java can do?

Another thing I have been reading in some sites is that Perl is "slow" compared to Java??

About 10 years ago, in order to fulfill the requirements for a for a final contract to be signed with a big company, the Java Witnesses coded a web interface to the ticket system living inside SAP (CATB). They coded for about two years trying to make everything generic, which led to a compressed source tarball of about 20MB. Signing day drew nigh, and a new requirement dropped in: they had to retrieve yet another datum from the vast SAP data table desert. Two weeks left, and they admitted, that they couldn't do it: too vast the sources and entanglements had grown, and they would have needed far more than two weeks to accomplish the task. I heard about that informally (i.e. gossip), and whipped up the whole crap on a sunday in merely 4 hours using SAP::Rfc (superseded by SAPNW::Rfc) in perl. On monday I presented my solution, which ran in no time compared to the Java solution, with just a fraction of memory footprint, was easily extendable and already did more than the Java bulk. Some bits of CSS fumbling, corrections here and there, and the stuff was up and running.

So, faster in execution, in development, much easier to maintain and extend. Not that I earned much reward with that - see the parable of the two programmers. The task turned out to be quite easy.

This again is anecdotal, I know, but also first class witness, and I know I am biased - heavily towards perl, by experience. Java folks tend to overcomplicate things (which leads to bloat, again ;-).

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Replies are listed 'Best First'.
Re^3: Can Perl do anything Java can do?
by haukex (Archbishop) on Jul 23, 2017 at 21:23 UTC

    I don't know if your reply was meant for me because you seem to be quoting this node? But I'll reply anyway:

    I dunno, my experiences with Java were not as bad. Whenever I hear "Java is slow and bloated", I wonder how much of that is hard evidence (if I had the time right now I'd run a benchmark or two), and how much of that is a stereotype originating from the days Java was first introduced and it was slow and bloated. Nowadays, with JIT and Java having many of its library functions implemented in native code (kind of like Perl's XS), I really do wonder how true that still is. Java isn't the fastest language of course, but sometimes I feel that the "Java is slow because it runs on a VM" complaint is roughly on the same level as "Perl is slow because it's interpreted". Adding that it's possible to write bad programs in any language, and that Java is in more widespread use than Perl, then there will unfortunately be a larger number of bad programs written in Java ;-)

    I don't mean to rip on your post in particular, I'm just giving my two cents because I'm seeing the "Java is slow" meme in several posts in this thread.