Re: Speed: sprintf vs. & operator

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi Rob,
     Not sure what version of deparse u are mentioning but here is the
original test code i presented to you. will deparse_old() be as fast as
deparse_new()

Jordah
--original derparse()
global function deparse_old(sequence list, integer c)
sequence s
   if length(list) then
      s = list[1]
      for i = 2 to len by 1 do
 	 s =s&c&list[i]
         end for
      return s
   end if
   return ""
end function

global function deparse_new(sequence list, integer c)
sequence s
   if length(list) then
      s = list[1]
      for i = 2 to length(list) by 1 do
      s =s&c
      s=s&list[i]
      end for
     return s
   end if
   return ""
end function

----- Original Message -----
From: "Robert Craig" <rds at RapidEuphoria.com>
To: "EUforum" <EUforum at topica.com>
Sent: Wednesday, January 08, 2003 12:51 AM
Subject: Re: Speed: sprintf vs. & operator


>
> Jordah Ferguson writes:
> > Will this solution fix the problem deparse()
> > presented a couple of months ago.
>
> It will only be faster when you have multiple concatenations
> in one expression. The version of deparse() that I looked at
> just now, has only single concatenations at a time.
> If you change the code to do multiple concatenations
> (when there are 3 or more items to concatenate)
> then it will be faster in 2.4.
>
> Regards,
>    Rob Craig
>    Rapid Deployment Software
>    http://www.RapidEuphoria.com
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu