Thomas Gumz brings up a point in a post on the Notes 6 Gold forum
about the inefficiency of using an ampersand ("&") to concatenate strings:
...by all means don't concatenate all your strings via "&" (because this is slow and inefficient).
Use "+" instead.
BAD :strBody = strBody & "Fax " & conFaxNumber
GOOD: strBody = strBody + "Fax " + conFaxNumber
If conFaxNumber isn't a string, then use this:
strBody = strBody + "Fax " + Cstr(conFaxNumber)
Thomas - IBM
Now, I am a bit of an efficiency nut, but while I have heard this before, I continue to use ampersand a lot. How much slower do you think it really is? Anybody have experience with this? Should I go rewrite the places that use ampersands to use plus signs instead? Or is this too small to matter on today's modern systems, and should I just remember it going forward?
Copyright © 2005 Genii Software Ltd.