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/db-wg@ripe.net/
performance patch
- Previous message (by thread): performance patch
- Next message (by thread): <auto-dbm at ripe.net> is slow this afternoon.
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Oliver Smith
oliver at demon.net
Thu Mar 19 12:25:41 CET 1998
> 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 ) ) { The optimum includes ignoring leading and trailing blanks, which is: foreach $tmpword (split(' ', $tmppol)) { This behaviour is documented as providing emulation of AWK behaviour. Oliver
- Previous message (by thread): performance patch
- Next message (by thread): <auto-dbm at ripe.net> is slow this afternoon.
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[ db-wg Archives ]