Re: Sequence test
- Posted by gwalters Dec 29, 2009
- 1256 views
Forked from Re: Edita on 4.0a3
Actually, my tests show it 13,800 times slower (0.03 vs 414 seconds), probably an exponential slowdown due to messed up refcounts. It has nothing to do with the new and bizarre include system, try this:
atom t t = time() sequence text integer lineno, count function Clone(sequence intxt) George integer lt lt = length(intxt) return intxt[1..lt] end function text = {repeat("1234",60000)} count = 0 lineno = 0 while 1 do if lineno>=length(text[1]) then exit end if lineno += 1 text[1][lineno] = Clone(text[1][lineno]) count += 1 if count>2000 then printf(1,"unpacking %d\n",{lineno}) count = 0 end if end while printf(1,"done, t=%3.2f\n",time()-t)
I tried this code in Windows (Vista) with exwc of rev 1351 and 1352.
My result for 1351 is t=0.13 and for 1352 t=155.99. There must be a change in rev 1352 (introduces inline) which creates this strange behaviour. This must not necessarily be because of inlining.
If I add: without inline in the code and run it with rev 3025 I get the same result with or without this line: t=194.5.
Btw if I translate with euc -con the result is: t=0.09
Roland
I'm still running 2.4 and t is .04 running interpretive.
George