About RIPE | Contact  | Search | Sitemap    
Homepage RIPE  
RIPE Community Mail Archives
search  
     
RIPE Navigation Ends
About RIPE Maillists
Maillists Archive
Global Lists
Non Active Lists
RIPE NCC Navigation Ends
Next Section
<<< Chronological >>> Author Index    Subject Index <<< Threads >>>

Re: performance patch

  • To: Jan-Pieter Cornet < >
  • From: Curtis Villamizar < >
  • Date: Wed, 18 Mar 1998 12:00:24 -0500
  • Cc:
  • Reply-to:

In message <199803172224.XAA24402@localhost>, Jan-Pieter Cornet writes:
> Curtis Villamizar wrote:
> > I hope this is the right place to send a tiny patch.  In any case,
> > this minor recoding makes the syntax check go a whole lot faster.
> 
> I have no idea about the right place, however, being a strict perl
> devotee, I couldn't let the following slip by:
>  
> > !        foreach $tmpword ( split("\\s+", "$tmppol") ) {
> 
> *horrified*. I guess you normally use TCL where such constructs are normal?
> I'd write (which makes it even faster because the regexp needn't be compiled
> every time)
>           
>            foreach $tmpword ( split( /\s+/, $tmppol ) ) {
> 
> Sorry for the extra intrusion,


We went from almost 2 hourse to under 10 minutes and you want to
improve appearance and shave one large string copy and probably a few
milliseconds.

You guys just don't get it:

	while ($tmppol=~ s/(\S+)//) {

On a very long string with a few thousand "words" this change the
length of the string a couple of thousand times.  These are the kind
of things that actually make a difference.

Thanks for the practical suggestion.  :-)

Curtis




  • Post To The List:
<<< Chronological >>> Author    Subject <<< Threads >>>
 

Next Section
     About RIPE | Site Map | LIR Portal | About the RIPE NCC | Contact | © RIPE Community. All rights reserved.
RIPE.NET Homepage LIR Portal RIPE Community