Testing: add missing file
[GitX.git] / speed_test / README
blob205aef61f8120dc83609ad5a34df086b8fe41820
1 These tests demonstrate 3 different ways to allocate memory for the graph
2 viewer.
4 The methods:
6 1. global
7   This method allocates a global memory pool that is used by all structs.
8   It is the fastest method and should be easy to clean up. You do have to
9   make sure that any pointers to the memory used by others is cleaned up.
10 1. malloc
11   This methods does two mallocs for every iteration. It is slightly slower
12   (2x as slow), but won't require as much unfragmented memory. It is harder
13   to clean up this memory, as it requires an equal amount of free's.
14 2. array
15   This method uses NSMutableArray's to store the necessary information. It is
16   by far the slowest (10x slower than global) but will make use of
17   Objective-C's garbage collection. This is the easiest way to go if it isn't
18   too slow. Looping and creating the arrays takes about 2 seconds for 800k
19   iterations. The question is if this significantly slows down the work.
21 Results:
23    global:  0.18 seconds
24   malloc:   0.39 seconds
25    array:   1.90 seconds