[DGD]Re Need tips with LPC function Im writing.
Geir Harald Hansen
geirhans at ifi.uio.no
Wed Mar 24 02:52:21 CET 1999
> BTW. Color search & replace can also be done by parse_string()
Interesting idea. parse_string() is a versatile function :)
Anyone have some wise words about efficiency of parse_string(), explode()
and sscanf() for things like this?
And lookups? The switch statement is faster than a mapping?
If all, or most, of messages sent to players get converted like this, I
guess it should be fast. ;)
If the majority of messages do not contain colorcodes, maybe there is also
something to gain by first checking for the existence of colorcodes with a
little loop before actually calling a function to translate them?
-- Geir Harald Hansen, geirhans at ifi.uio.no
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list