> Le 13 mai 2017 à 16:01, Arnaud de Montard via 4D_Tech <[email protected]> 
> a écrit :
> 
[...]

Previous code modified to evaluate if time taken to add more and more memory is 
linear. 
It seems not, each step "costs" a little more than the previous one (macOS). 

+++
C_BLOB($_x)
$Mbyte_l:=1*10^6
SET BLOB SIZE($_x;$Mbyte_l)
ARRAY BLOB($_ax;0)
ARRAY LONGINT($_al;0)
$i_l:=0
APPEND TO ARRAY($_al;Tickcount)
Repeat 
        $i_l:=$i_l+1
        If ($i_l%1000=0)
                APPEND TO ARRAY($_al;Tickcount)  //time to add previous 1000 
elements
        End if 
        APPEND TO ARRAY($_ax;$_x)
Until ($i_l>MAXINT)
APPEND TO ARRAY($_al;Tickcount)  //total time
+++

(subtracting each $_al value to previous)
114
129
126
141
139
144
147
156
188
200
204
209
218
222
225
234
232
236
240
243
246
249
255
256
260
294
269
299
289
288
299
298
229

-- 
Arnaud de Montard 




**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to