Debian Codegraph @

test/manually/cacheBlock.praat

raw
1 # test/manually/cacheBlock.praat
2 # Paul Boersma, 13 August 2025
3 # 21 September 2025: accommodate API change
4
5 timeStep = 0.001 ; seconds
6 samplingFrequency = 1e8 ; 100 MHz: several 10-MB buffers
7 writeInfoLine: "Trying to cause cache misses..."
8 margin = 0.0399 ; seconds
9
10 #
11 # Almost equally fast:
12 #
13 ;Debug multi-threading: "yes", 16, 0, "no"
14 Debug multi-threading: "yes", 6, 0, "no"
15 ;Debug multi-threading: "yes", 4, 0, "no"
16 # slower:
17 ;Debug multi-threading: "yes", 1, 0, "no"
18
19 ;sound100 = Create Sound from formula: "sineWithNoise", 1, 0, 100 + margin, samplingFrequency, "1/2 * sin (2*pi*377*x) + randomGauss (0, 0.1)"
20 sound10 = Create Sound from formula: "sineWithNoise", 1, 0, 10 + margin, samplingFrequency, "1/2 * sin (2*pi*377*x) + randomGauss (0, 0.1)"
21 sound1 = Create Sound from formula: "sineWithNoise", 1, 0, 1 + margin, samplingFrequency, "1/2 * sin (2*pi*377*x) + randomGauss (0, 0.1)"
22 sound01 = Create Sound from formula: "sineWithNoise", 1, 0, 0.1 + margin, samplingFrequency, "1/2 * sin (2*pi*377*x) + randomGauss (0, 0.1)"
23 appendInfoLine: "sounds created"
24
25 ;selectObject: sound100
26 ;stopwatch
27 ;pitch100 = To Pitch (raw autocorrelation): timeStep, 75, 600, 15, "no", 0.03, 0.45, 0.01, 0.35, 0.14
28 ;appendInfoLine: stopwatch
29
30 selectObject: sound10
31 stopwatch
32 pitch10 = To Pitch (raw autocorrelation): timeStep, 75, 600, 15, "no", 0.03, 0.45, 0.01, 0.35, 0.14
33 appendInfoLine: stopwatch
34
35 selectObject: sound1
36 stopwatch
37 pitch1 = To Pitch (raw autocorrelation): timeStep, 75, 600, 15, "no", 0.03, 0.45, 0.01, 0.35, 0.14
38 appendInfoLine: stopwatch
39
40 selectObject: sound01
41 stopwatch
42 pitch01 = To Pitch (raw autocorrelation): timeStep, 75, 600, 15, "no", 0.03, 0.45, 0.01, 0.35, 0.14
43 appendInfoLine: stopwatch
44
45 removeObject: sound01, sound1, sound10, pitch01, pitch1, pitch10
46
47 Debug multi-threading: "yes", 0, 0, "no"