warning feature in using "&" operator
- Posted by Lee woo seob <wslee at HHI.CO.KR> Apr 30, 1997
- 945 views
Hi everyone! It was found that there can be huge time consuming in using "&" operator. Please run the example program below and check the time for each pattern of using "&". I don't know why. Does anyone know on how to optimize speed in using "&"? -- code start here sequence a atom t integer j,k j=1 k=2 -- first pattern of using "&" a={} t=time() for i=1 to 10000 do a=a&j a=a&k -- fast end for ? time()-t -- second pattern of using "&" a={} t=time() for i=1 to 10000 do a=a&(i&j) -- huge time consumming. beacomes more severe as -- the size of "a" increase. end for ? time()-t -- code ends here