This archive is retained to ensure existing URLs remain functional. It will not contain any emails sent to this mailing list after July 1, 2024. For all messages, including those sent before and after this date, please visit the new location of the archive at https://mailman.ripe.net/archives/list/[email protected]/
performance patch
- Previous message (by thread): performance patch
- Next message (by thread): performance patch
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Robert Martin-Legene
robert at DK.net
Tue Mar 17 21:31:53 CET 1998
I don't run the code myself, but..... On Tue, 17 Mar 1998, Curtis Villamizar wrote: > Index: src/syntax.pl > =================================================================== > RCS file: /usr/local/CVS-routing-dev/irr-source/dbase/src/syntax.pl,v > retrieving revision 2.4 > diff -c -r2.4 syntax.pl > *** syntax.pl 1997/11/14 20:49:12 2.4 > --- syntax.pl 1998/03/17 19:59:25 > *************** > *** 490,501 **** > # > # Now check the actual keywords > # > ! while($tmppol =~ s/(\S+)//) { > ! if (!&isaskeyword($1)) { > ! return $O_ERROR, > ! "syntax error in \"$ATTL{$key}: peer $as cost $pref\"\n\t$1 ". > ! > ! "is not a routing policy KEYWORD"; > } > } > return $O_OK; > --- 490,501 ---- > # > # Now check the actual keywords > # > ! local($tmpword); > ! foreach $tmpword ( split("\\s+", "$tmppol") ) { > ! if (!&isaskeyword($tmpword)) { > ! return $O_ERROR, > ! "syntax error in \"$ATTL{$key}: peer $as cost $pref\"\n". > ! \t$tmpword is not a routing policy KEYWORD"; Aren't you missing a " in the beginning here? > } > } > return $O_OK; > Also, wouldn't this use of split by ever so slightly faster? : split(/\s+/, $tmppol) Sorry, I always use / instead of ' here, but I was mostly referring to wrapping $tmppol. Just a thought. I guess it's hard to measure :-) -- Robert Martin-Leghne (RM59), Network Manager, DKnet (AS2109), Denmark main(){int a[2],b[2];pipe(a);pipe(b);if(fork()){dup2(a[0],0);dup2(b[1],1) ;}else{dup2(b[0],0);dup2(a[1],1);write(1,"R",1);}execlp("cat","cat",0);}
- Previous message (by thread): performance patch
- Next message (by thread): performance patch
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[ db-wg Archives ]