Re: Java v Perl dashing golf

[email protected] (Yanick)
Newsgroups perl.golf
Message-ID <[email protected]>
On Wed, Sep 18, 2002 at 12:09:18AM +1000, [email protected] wrote:
> I have not seriously tried the 100 meter dash, but this
> one should be a little faster:
> 
> #!perl -n
> /^192\.(?:9|18|29)\./||/(?i:gif|jpg|css) HTTP/ or print

  /^192\.(?:9|18|29)\./||/(gif|jpg|css|GIF|JPG|CSS) HTTP/ or print

  is much faster (or so a quick test seems to indicate). On a ad hoc
test file of 100Megs, this script beats the java program of a few
seconds (I get 7 seconds for perl, and 9 for java).

Joy,
`/anick

-- 
When we cannot bear to be alone, it means we do not properly value 
the only companion we will have from birth to death -- ourselves. 
- Eda LeShan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.