🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
9 messages
9 total messages Started by System Administrator Wed, 03 Jun 1998 00:00
Re: feed question on alt.binaries.sounds.mp3
#28793
Author: System Administrator
Date: Wed, 03 Jun 1998 00:00
16 lines
1055 bytes
     When using Perl proggy's in INN, like with Clean Feed etc, is it
wise to compile them or use a perl to C converter and compile them
that way for speed's sake?

     Thanks

     Homer

--
------------------------------------------------------------------------
Homer Wilson Smith     News, Web, Telnet      Art Matrix - Lightlink
(607) 277-0959         E-mail, FTP, Shell     Internet Access, Ithaca NY
homer@lightlink.com    info@lightlink.com     http://www.lightlink.com

Re: feed question on alt.binaries.sounds.mp3
#28789
Author: Jeremy
Date: Wed, 03 Jun 1998 00:00
27 lines
1673 bytes
Andrew Gierth  <andrew@erlenstar.demon.co.uk> wrote:

>  Jeremy> Converting perl to C doesn't provide any performance benefit,
>  Jeremy> last I heard.
> 
> Oh, in some applications there is no comparison. I rewrote most of my
> cancel-analysis code in C++ when the volume started to get really large;
> I got rather better than a 10x speed increase.

Oh, sure, *rewriting* in C will speed you up in many cases.  I was
talking about running it through a Perl-to-C converter thingy though.
Unless they've improved the quality of code those things produce...

>  Jeremy> Perl is fast.  Perl is really, really fast.  Don't worry
>  Jeremy> about it. :)
> 
> Nope, sometimes you *do* have to worry about it.

For filtering, I wouldn't worry about it.

-- 
Jeremy | jeremy@exit109.com
"...by God I *KNOW* what this network is for, and you can't have it."
                             --Russ Allbery

Re: feed question on alt.binaries.sounds.mp3
#28796
Author: Fluffy
Date: Wed, 03 Jun 1998 00:00
19 lines
1318 bytes
homer@light.lightlink.com (System Administrator) writes:

>      When using Perl proggy's in INN, like with Clean Feed etc, is it
> wise to compile them or use a perl to C converter and compile them
> that way for speed's sake?

In a word, no.  The current perl compiler won't give you much of a
performance boost in most cases.  Anyway, the biggest performance
penalty with interpreted perl is when you first activate the script,
and that only happens when you start INN or reload the filter.

Perl is plenty fast enough for filtering articles; but if you _really_
want more speed, write directly in C.  That does add a compile/link
step to any filter changes, so think a _long_ time before going that
way.


Re: feed question on alt.binaries.sounds.mp3
#28797
Author: Jeremy
Date: Wed, 03 Jun 1998 00:00
22 lines
1454 bytes
System Administrator <homer@light.lightlink.com> wrote:

>      When using Perl proggy's in INN, like with Clean Feed etc, is it
> wise to compile them or use a perl to C converter and compile them
> that way for speed's sake?

Perl programs are compiled when they are loaded, and then they are
run.  You don't just compile them, and doing so would only benefit
in startup time, which isn't important for this application.

Converting perl to C doesn't provide any performance benefit, last
I heard.  And, once you've got C, what will you do with it?  Innd
is looking for Perl code.

Perl is fast.  Perl is really, really fast.  Don't worry about it. :)

-- 
Jeremy  |  jeremy@exit109.com
The customer is always right, until he tries to say something.

Re: feed question on alt.binaries.sounds.mp3
#28798
Author: Fluffy
Date: Wed, 03 Jun 1998 00:00
13 lines
1215 bytes
Andrew Gierth <andrew@erlenstar.demon.co.uk> wrote:

> Oh, in some applications there is no comparison. I rewrote most of my
> cancel-analysis code in C++ when the volume started to get really large;
> I got rather better than a 10x speed increase.

Perl's weakest spot is in large tables and hashes.  I was trying some
stupid tricks with active, and the options in perl were either
painfully slow or used obscene amounts of RAM.  Typed data and Real
Pointers do have their advantages.

Re: feed question on alt.binaries.sounds.mp3
#28812
Author: Clayton O'Neill
Date: Thu, 04 Jun 1998 00:00
29 lines
1937 bytes
On 3 Jun 1998 22:31:59 GMT, Jeremy <jeremy@exit109.com> wrote:
|System Administrator <homer@light.lightlink.com> wrote:
|
|>      When using Perl proggy's in INN, like with Clean Feed etc, is it
|> wise to compile them or use a perl to C converter and compile them
|> that way for speed's sake?
|
|Perl programs are compiled when they are loaded, and then they are
|run.  You don't just compile them, and doing so would only benefit
|in startup time, which isn't important for this application.
|
|Converting perl to C doesn't provide any performance benefit, last
|I heard.  And, once you've got C, what will you do with it?  Innd
|is looking for Perl code.
|
|Perl is fast.  Perl is really, really fast.  Don't worry about it. :)

Cleanfeed eats more CPU on my feed box than Cyclone does.  I worry about it.


-- 
-------------------------------------------------------------------------
"The internet, of course, is more than a place to find pictures of people
having sex with dogs" -- Philip Elmer Dewitt, Time Magazine, July 3, 1995
-------------------------------------------------------------------------
blahblahblah@oneill.net                                 coneill@erols.com

Re: feed question on alt.binaries.sounds.mp3
#28814
Author: Jeremy
Date: Thu, 04 Jun 1998 00:00
17 lines
1255 bytes
Clayton O'Neill <usenet@oneill.net> wrote:

> Cleanfeed eats more CPU on my feed box than Cyclone does.  I worry
> about it.

Cleanfeed sucks it up when running on Cyclone/Typhoon, because it
has to do all that main loop stuff, reading in the articles and
parsing everything, which INN doesn't require.  It's just a result
of the filter interface; I can optimize, but it's not going to be
as efficient as INN.

-- 
Jeremy  |  jeremy@exit109.com
"Who's scruffy-looking?"  --Han Solo

Re: feed question on alt.binaries.sounds.mp3
#28816
Author: brian moore
Date: Thu, 04 Jun 1998 00:00
41 lines
2599 bytes
On Wed, 03 Jun 1998 23:31:29 GMT, 
 Fluffy <vulis@meow.org> wrote:
> Andrew Gierth <andrew@erlenstar.demon.co.uk> wrote:
> 
> > Oh, in some applications there is no comparison. I rewrote most of my
> > cancel-analysis code in C++ when the volume started to get really large;
> > I got rather better than a 10x speed increase.
> 
> Perl's weakest spot is in large tables and hashes.  I was trying some
> stupid tricks with active, and the options in perl were either
> painfully slow or used obscene amounts of RAM.  Typed data and Real
> Pointers do have their advantages.

Sometimes.... but there's a huge development advantage in being Lazy
and letting Larry Wall's hash algorithm do the hashing.  Certainly
a custom-tweaked algorithm could do better, but then you'd spend time
developing it and chasing down memory leaks and wayward pointers.
Not a lot of fun.

We won't even get into how much of a pain a huge-honking-pile-of-regex's
is to deal with in C and how Perl makes them easy.  Being able to futz
with Cleanfeed on the fly is a huge bonus.

Jeremy's done a ton of work benchmarking Cleanfeed in how to optimize
regex's, which pays off.  On most systems (at least INN based where
it's all the same process), Cleanfeed has a pretty slim CPU load.  It
certainly saves over shoving things into spamfilled directories. :)

But, as said, the 'advantage' to the perl compiler is that you lose
much of the startup cost.  In this case, that's a minimal part of the
time spent.  Perl is already semi-compiled: it just has a compiler
that's so fast we usually forget it makes a couple passes over the
program byte-compiling and then peephole optimizing.  (Ah, if only
gcc was as fast....)

-- 
Brian Moore                             Kill A Spammer For Jesus
Sysadmin, C/Perl Hacker, Usenet Vandal 

Re: feed question on alt.binaries.sounds.mp3
#28828
Author: Andrew Gierth
Date: Thu, 04 Jun 1998 00:00
25 lines
1591 bytes
>>>>> "Jeremy" == Jeremy  <jeremy@exit109.com> writes:

 Jeremy> Converting perl to C doesn't provide any performance benefit,
 Jeremy> last I heard.

Oh, in some applications there is no comparison. I rewrote most of my
cancel-analysis code in C++ when the volume started to get really large;
I got rather better than a 10x speed increase.

Annihilator, though, is mostly Perl code. The only C++ bits are the
spool reader code and the MIME parser/decoder/digester, both of which
are implemented as Perl modules. (Initially, the C++ code was the main
program, which embedded a Perl interpreter; I turned it around,
though, to put the main loop in Perl code.)

 Jeremy> Perl is fast.  Perl is really, really fast.  Don't worry
 Jeremy> about it. :)

Nope, sometimes you *do* have to worry about it.

-- 
Andrew.

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads