File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,23 @@ go get github.com/linux4life798/safetyfast
14
14
15
15
Checkout the [ SafetyFast Project Page] ( http://craighesling.com/project/safetyfast ) .
16
16
17
+ # Benchmarking
18
+
19
+ The following plot shows the number of milliseconds it took for 8 goroutines
20
+ to increments 480000 random elements (per goroutine) of an array of ints.
21
+ The x axis denotes how large (and therefore sparse) the array was.
22
+ The synchronization primitive used during the increment is indicated as
23
+ a series/line.
24
+
25
+ ![ Performance Graph] ( benchmarks/output-craigmobileworkstation.svg )
26
+
27
+ Note that, as the array size increases, the likelihood of two goroutines
28
+ touching the same element at the same instance decreases.
29
+ This is why we see such a dramatic increase in speed, when using either
30
+ the HLE or RTM style synchronization primitive.
31
+
32
+ The ` SystemMutex ` is just ` sync.Mutex ` .
33
+
17
34
# Examples
18
35
19
36
## Checking for HLE and RTM CPU support
You can’t perform that action at this time.
0 commit comments