Google is jading me

cwest on 2002-02-07T16:23:38

I can think of all kinds of neat things that I could do with that Google data, in Perl. The great part? It would take me half the time to implement the sort of things C++ and Java programmers will do. And I can do cooler stuff with Perl.

So why would they discriminate against all languages but C++ and Java? I can think of three good reasons:

1. They're looking for a new employee and they use C++ and Java in house.

2. They want to make the contest really difficult... difficult to do good and fun things, that is.

3. They believe FUD about interpreted languages.

All three are retarded reasons, imho.


Same Here

chaoticset on 2002-02-07T16:33:59

Which is really unfair of me, I think -- Google's always been a handy tool. It's just frustrating that I can't apply anything I learned recently to a spiffy-sounding contest.

Another reason

pudge on 2002-02-07T17:15:22

They don't want to have to make sure they support whatever version of perl + modules + shell etc. that you need. That's my guess.

<flamebait>

chromatic on 2002-02-07T18:41:50

What's not interpreted about Java? They've split perl into perlc and perl+Byteloader. :)

</flamebait>

The opposition

Matts on 2002-02-08T00:01:28

I don't mean to support the opposition, but perl is slow. I mean it's fast at some things, but likely the things you'd need to do to make a process work against their multi-billion document repository just wouldn't be possible in Perl. I guess I'm willing to eat my words if somebody can make it happen, but compared to C++ and Java (yes, Java), Perl is going to get lost in the performance dust (assuming we're talking Perl without XS, and even if you use XS, without Perl data structures).

Please, prove me wrong (don't just argue with me!)

Re:The opposition

pudge on 2002-02-08T13:45:48

I can understand thinking that Perl is slow against billions of documents; but so is Java, and C++ isn't much better. I can understand if they wanted to do it in C, but come on, Perl is not going to be "lost in the performance dust" to Java. It just isn't.

Please, prove me wrong (don't just argue with me!)

Re:The opposition

Matts on 2002-02-08T16:07:52

There's plenty of proof out there that Java can be close to as fast as C++ based stuff. Take parsing as a dead simple example. Perl parsers are really slow - HTML::Parser was ported to XS for this reason, XML::SAX::PurePerl crawls along, etc. Java XML and HTML parsers on the other hand blaze along. Not nearly as fast as C of course, but beating the pants off Perl.

Part of the problem is Perl only has access to very high level information - strings, hashes, arrays. Whereas C, C++ and Java all have access to efficient structs-type things, characters, efficient arrays, efficient linked lists, efficient trees, etc. These make programs involving millions of iterations significantly faster.

No doubt Java can be slow, and there's no doubt it's often hard to make it efficient (or rather, it's easy to write inefficient Java), but it's not going to be comparable to Perl until we get Parrot, and JIT, and proper structures instead of hashes.

Don't believe me still? Check out the Great Computer Language Shootout. Java even kick's Perl's butt in the second hash test for crisake!

Re:The opposition

pudge on 2002-02-08T16:24:39

No, I don't believe you. Even on your supplied link, perl is faster than Java in wc, network echo, the FIRST hash test, "HELLO WORLD" (!), list processing, regular expressions, spell checking, statistical moments, string concatenation,
word frequency, and more. Perl is MUCH faster in most of those tests. I don't see by what basis you can think Java is, in your words, "lost in the performance dust."

And quite literally, this site you linked to disproves your theory, unless you are relying primarily on XML support for it: most of the places Java beats perl in are things that most people probably wouldn't rely on much if at all in the context of this Google contest: object instantiation, exceptions, matrix multiplication. At worst, Perl comes in about even on data processing and manipulation (and probably better). And Perl is also significantly better on memory use.

So it looks like you're primarily arguing about XML processing ... and that's something I don't care about in the first place.

Re:The opposition

Matts on 2002-02-10T14:31:46

Well I ran the crapshoot scores, with Object instantiation, exceptions and matrix multiplication all turned down to score 1, and Java still beat Perl overall. I'm trying to find a weighting where Java doesn't beat Perl overall, but I haven't found one yet, at least not one that ignores some things that the systems that most people in the perl community work with and develop every day - Objects, method calls, hash access, regular expressions.

Play for yourself. I'd love to see what settings Perl comes out on top with, assuming you don't just crank up regexps and set everything else at zero.

Re:The opposition

pudge on 2002-02-10T15:18:22

I don't know what most people work with and develop every day, and I don't think you do, either. I don't buy for a moment that this is representative of what most people do (especially how you leave method calls as 5!). Here's one example of where Perl beats Java, where IMO data manipulation and processing are all much more important than exceptions, object instantiation, method calls, etc.

And in any event, your claim was not that Java was faster than Perl -- and according to this site, for what I, and I believe most people, do with Perl it is not faster regardless -- but that it leaves Perl in the dust. You've not shown that it leaves Perl in the dust, you've shown that Java is faster for what you do, which is not what I do by any means.

Further, when you add in memory use (let along lines of code), Perl handily beats Java. And in addition, Google has added Python to allowed languages, and Perl beats Python in every case, which destroys your theory about why Google did this (not that you ever proved it in the first place :-).

Re:The opposition

Matts on 2002-02-10T16:51:32

Actually you should have turned off/down Heapsort too, which is pants in the Perl version because they don't allow it to use sort().

If Google have added Python too, and still dismiss Perl, then I think we should firebomb them. Nuff said.

Re:The opposition

pudge on 2002-02-10T17:28:59

:)