Debian Codegraph @

test/num/alloc.praat

raw
1 writeInfoLine: "alloc versus zero"
2
3 numberOfChecks = 100
4 for n from 1 to numberOfChecks
5 result$ = Praat test: "TimeAlloc", string$ (10^7 / n), string$ (n), "", ""
6 durationAlloc = extractNumber (result$, "")
7 result$ = Praat test: "TimeAlloc0", string$ (10^7 / n), string$ (n), "", ""
8 durationAlloc0 = extractNumber (result$, "")
9 result$ = Praat test: "TimeZero", string$ (10^7 / n), string$ (n), "", ""
10 durationZero = extractNumber (result$, newline$)
11 result$ = Praat test: "TimeMalloc", string$ (10^7 / n), string$ (n), "", ""
12 durationMalloc = extractNumber (result$, newline$)
13 result$ = Praat test: "TimeCalloc", string$ (10^7 / n), string$ (n), "", ""
14 durationCalloc = extractNumber (result$, newline$)
15 appendInfoLine (n, " ", durationAlloc, " ", durationAlloc0, " ", durationZero, " ", durationMalloc, " ", durationCalloc)
16 endfor
17 for i from 1 to 100
18 n = i*100
19 result$ = Praat test: "TimeAlloc", string$ (max (10^7 / n, 1)), string$ (n), "", ""
20 durationAlloc = extractNumber (result$, "")
21 result$ = Praat test: "TimeAlloc0", string$ (max (10^7 / n, 1)), string$ (n), "", ""
22 durationAlloc0 = extractNumber (result$, "")
23 result$ = Praat test: "TimeZero", string$ (max (10^7 / n, 1)), string$ (n), "", ""
24 durationZero = extractNumber (result$, newline$)
25 result$ = Praat test: "TimeMalloc", string$ (max (10^7 / n, 1)), string$ (n), "", ""
26 durationMalloc = extractNumber (result$, newline$)
27 result$ = Praat test: "TimeCalloc", string$ (max (10^7 / n, 1)), string$ (n), "", ""
28 durationCalloc = extractNumber (result$, newline$)
29 appendInfoLine (n, " ", durationAlloc, " ", durationAlloc0, " ", durationZero, " ", durationMalloc, " ", durationCalloc)
30 endfor
31 for i from 1 to 100
32 n = i*10000
33 result$ = Praat test: "TimeAlloc", string$ (max (10^7 / n, 1)), string$ (n), "", ""
34 durationAlloc = extractNumber (result$, "")
35 result$ = Praat test: "TimeAlloc0", string$ (max (10^7 / n, 1)), string$ (n), "", ""
36 durationAlloc0 = extractNumber (result$, "")
37 result$ = Praat test: "TimeZero", string$ (max (10^7 / n, 1)), string$ (n), "", ""
38 durationZero = extractNumber (result$, newline$)
39 result$ = Praat test: "TimeMalloc", string$ (max (10^7 / n, 1)), string$ (n), "", ""
40 durationMalloc = extractNumber (result$, newline$)
41 result$ = Praat test: "TimeCalloc", string$ (max (10^7 / n, 1)), string$ (n), "", ""
42 durationCalloc = extractNumber (result$, newline$)
43 appendInfoLine (n, " ", durationAlloc, " ", durationAlloc0, " ", durationZero, " ", durationMalloc, " ", durationCalloc)
44 endfor