A | B | C | D | E | |
---|---|---|---|---|---|
1 | Slice type (16777216 elements) | Create elements and insertion into slice | |||
2 | Nano seconds | Bytes | |||
3 | Struct | 129347993 | 134217728 | ||
4 | Struct but two way assignment | 463033044 | 268435464 | ||
5 | Pointer to a struct | 558101324 | 268435463 | ||
6 | No Pointers | 40417179 | 134217728 | ||
7 | |||||
8 | |||||
9 | Time differences (% less time row type over column type) | Struct | Struct but two way assignment | Pointer to a struct | No Pointers |
10 | Struct | 72.07% | 76.82% | -220.03% | |
11 | Struct but two way assignment | -257.97% | 17.03% | -1045.63% | |
12 | Pointer to a struct | -331.47% | -20.53% | -1280.85% | |
13 | No Pointers | 68.75% | 91.27% | 92.76% | |
14 | |||||
15 | Memory differences (% less Bytes row type over column type) | Struct | Struct but two way assignment | Pointer to a struct | No Pointers |
16 | Struct | 50.00% | 50.00% | 0.00% | |
17 | Struct but two way assignment | -100.00% | 0.00% | -100.00% | |
18 | Pointer to a struct | -100.00% | 0.00% | -100.00% | |
19 | No Pointers | 0.00% | 50.00% | 50.00% | |
20 | |||||
21 | In graphs | CPU (seconds) | memory allocation space (GB) | ||
22 | Struct | 11.45 | 12.62 | ||
23 | Struct but two way assignment | 11.26 | 7.73 | ||
24 | Pointer to a struct | 6.83 | 5.26 | ||
25 | No Pointers | 10.07 | 50.12 | ||
26 | |||||
27 | Results from graphs per iteration | Num iterations | CPU (nano seconds) | memory allocation space (Bytes) | |
28 | Struct | 100 | 114500000 | 126200000 | |
29 | Struct but two way assignment | 30 | 375333333 | 257666667 | |
30 | Pointer to a struct | 20 | 341500000 | 263000000 | |
31 | No Pointers | 300 | 33566667 | 167066667 |