Debian Codegraph @

test/script/text100MB.praat

raw
1 # text100MB.praat
2 # Paul Boersma 2020-04-19
3
4 integerProperties$ = Report integer properties
5 bits = extractNumber (integerProperties$, "A pointer is")
6
7 echo Text 100 MB:
8 stopwatch
9 a$ = "a"
10 for i to if bits = 32 then 7 else 8 fi
11 a$ = a$ + a$ + a$ + a$ + a$ + a$ + a$ + a$ + a$ + a$
12 endfor
13 t = stopwatch
14 printline creating: 't:3' seconds
15 stopwatch
16 a$ > kanweg.txt
17 t = stopwatch
18 printline writing: 't:3' seconds
19 stopwatch
20 b$ < kanweg.txt
21 t = stopwatch
22 printline reading: 't:3' seconds
23 stopwatch
24 assert a$ = b$
25 t = stopwatch
26 printline comparing: 't:3' seconds
27 deleteFile ("kanweg.txt")