Re: Euphoria bug

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

> >Matt Lewis wrote:
> >What I find interesting is that you only have to assign something to a 
> >sub-sequence:
> >}}}
<eucode>
> >    s[1][1] = 0
> <font color="#330033">></eucode>
{{{
</font>
> >...before the loop, and it runs quickly.
> That does not seem to make a difference here.

Are you sure Pete? I thought a variation on Matt's code would be a neat
temporary fix.

sequence s
atom t
object data
constant repeats = 100000, len = 1000

s = repeat(repeat({}, len), len)
s[1][1] = {}--doesn't change initial structure and makes it fast

t = time()
for n = 1 to repeats do
s[999][999] =  1
data = s[999][999]
end for
?time()-t

machine_proc(26,0)

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

Search



Quick Links

User menu

Not signed in.

Misc Menu