Bugzilla 586, the fast char replacement (was Revolution compilation)

Michael D Mays michael.rr at mdmays.com
Tue Jan 4 12:00:35 EST 2005


This is good for a single char but beware if you say something like
  put "yy" into char 12345
you see a tremendous  slow up:

0.000008 -- y 100KB at char 99999
0.000013 -- y 10MB at char 9999999
0.000412 -- yy 100KB at char 99999
0.04          -- yy 10MB at char 9999999

But this is good to know. I had some running sums which really dragged 
on moderate sized data sets. But when I say
  put char i of tt into char 99444+i  of x
things really speed up. On my tests one char inset took 13 microseconds 
and 15 chars using a repeat loop took 37 (on a 10MB string)

Michael
On Jan 3, 2005, at 8:52 PM, Dar Scott wrote:

> Concerning bugzilla 586, the fast char replacement...
>
> On Jan 3, 2005, at 7:00 PM, Alex Tweedly wrote:
>
>> So 2 questions
>> 1. Is this fix already in 2.5 ?
>
> Yes.  Here is a timing demo for OSes that have a high res long seconds:
>
> on mouseUp
>   put longString(100000) into x
>   put the long seconds into a  -- OS X only
>   put "y" into char 4444 of x
>   put the long seconds into b
>   put b-a
> end mouseUp
>
> function longString n
>   put empty into s
>   repeat n times
>     put "x" after s
>   end repeat
>   return s
> end longString
>
> ==>
>
> .000014
>
>
> The fix is really an enhancement.  Either I goofed and labeled it a 
> bug or it got turned into a bug by another.
>
>> 2. Where in BZ do you look for that info ?
>
> I think that is normally the "target milestone".  Some of those fell 
> in a crack, but currently, those those are getting set.


More information about the use-livecode mailing list