Debian Codegraph @

test/num/mul.praat

raw
1 # mul.praat
2
3 iterations = 1000
4 size = 1000
5 vec# = zero# (size)
6 mat## = zero## (size, size)
7 vecje# = zero# (1)
8 matje## = zero## (1, 1)
9
10 stopwatch
11 for i to iterations
12 b## = mat##
13 endfor
14 writeInfoLine: stopwatch * 1e9 / size ^ 2 / iterations
15
16 stopwatch
17 for i to iterations
18 a# = mul# (vec#, mat##)
19 endfor
20 appendInfoLine: stopwatch * 1e9 / size ^ 2 / iterations
21
22 stopwatch
23 for i to iterations
24 a# = mul# (mat##, vec#)
25 endfor
26 appendInfoLine: stopwatch * 1e9 / size ^ 2 / iterations