Re: Speed: sprintf vs. & operator
- Posted by "Carl W." <euphoria at cyreksoft.yorks.com> Jan 07, 2003
- 497 views
jc at cowgar.com wrote: > What's quicker? > fullName = fn & " " & mn & " " & ln > or: > fullName = sprintf("%s %s %s", {fn,mn,ln}) > ? After a few tests I'm convinced the former is around 4 times faster than the latter. Go with the ampersands :) Hint: constant SP = ' ' -- -- other code -- fullName = fn & SP & mn & SP & ln ...is faster still. Carl -- [ Carl R White -=- aka -=- Cyrek the Illogical ] [ () E-mail...: cyrek{}cyreksoft.yorks.com ] [ /\ URL......: http://www.cyreksoft.yorks.com ]