Re: Java v Perl dashing golf

[email protected] (Yanick)
Newsgroups perl.golf
Message-ID <[email protected]>
On Tue, Sep 17, 2002 at 12:22:48PM -0500, Chris Dolan wrote:
> Yanick wrote:
> > On Wed, Sep 18, 2002 at 12:09:18AM +1000, [email protected] wrote:
> 
> /^192\.(?:9|18|29)\./||/\.(gif|jpg|css|GIF|JPG|CSS) HTTP/ or print
> 
> Also, "?:" is not really needed.  We don't care about backreferences.

	Indeed. And by not stocking'em, we are actually gaining a little
bit in speed (at least that's what I see). So:

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

	is still a wee bit faster.

> Shorter than `/'s:
>   -n /^192\.(9|18|29)\.|\.(gif|jpg|css|GIF|JPG|CSS) HTTP/||print

	shorter, but alas nowhere as fast.

	Of course, we will have to send whatever we end up with to
the gentleman who wrote that article. I think our one-liner is
getting close of being 50% faster than the 100 lines java program.
Not to mention 613% funnier to write. 

Joy,
`/anick

-- 
Love (luv) n. warm affection; sexual passion; sweetheart; score of nothing.
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.