-
Notifications
You must be signed in to change notification settings - Fork 0
/
alg_times.txt
69 lines (55 loc) · 1.42 KB
/
alg_times.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
time taken per algorithm (including memory allocation)
match_original with array queue
p time(s)
1 0.241001
0.1 0.278343
0.01 0.284422
0.001 0.287888
0.0001 0.204756
0.00001 0.040238
match_original with deque
p time(s)
1 0.24458
0.1 0.216629
0.01 0.222145
0.001 0.21906
0.0001 0.158751
0.00001 0.034285
match_naive (has deque)
p time(s)
1 0.022727
0.1 0.022483
0.01 0.023439
0.001 0.030696
0.0001 0.049771
0.00001 0.003577
===========================================================
times without memory allocation (the calls to clock() artifically slow the time though)
match_naive
p time(s)
1 0.010881
0.1 0.012853
0.01 0.013666
0.001 0.016608
0.0001 0.008042
0.00001 0.00112
match_original with deque
p time(s)
1 0.010527
0.1 0.011081
0.01 0.014071
0.001 0.014657
0.0001 0.004609
0.00001 0.000712
===========================================================
times (with memory allocation) comparing odd to even components with original algorithm
(averaged over 4 calls for each) - numbers somewhat suspect were effected by other operations of processor :/
P 9,999 nodes 10,000 nodes
1 3.76749 0.216147
0.1 0.57122 0.205224
0.01 0.25309 0.208170
0.001 0.21138 0.214734
0.0001 0.15119 0.154453
0.00001 0.03285 0.032658
(similar results comparing 9,998 with 9,997)
theory: a lot of time is being wasted trying to match the last node