Benchmarks Results
Using the simple false sharing detection script (numbers represents number of false sharing instances detected for each field, averaged from 100 traces):
- Benchmark1:
#tt: 2
- TestObject.field1: 0 (max: 0, min: 0)
#tr: 1, #tw: 1, #tacl: 2
- Benchmark2:
#tt: 2
- TestObject.field1: 0 (max: 0, min: 0)
#tr: 1, #tw: 0, #tacl: 2
- TestObject.field2: 685.98 (max: 835, min: 353)
#tr: 0, #tw: 1, #tacl: 2
- Benchmark3:
#tt: 2
- TestObject.field1: 712.00 (max: 958, min: 481)
#tr: 2, #tw: 2, #tacl: 2
- TestObject.field2: 709.42 (max: 959, min: 483)
#tr: 2, #tw: 2, #tacl: 2
- Benchmark4:
#tt: 4
- TestObject.field1: 139.87 (max: 448, min: 20)
#tr: 4, #tw: 1, #tacl: 4
- TestObject.field2: 140.20 (max: 395, min: 42)
#tr: 4, #tw: 1, #tacl: 4
- TestObject.field3: 1504.81 (max: 2251, min: 736)
#tr: 1, #tw: 1, #tacl: 4
- TestObject.field4: 1451.05 (max: 2199, min: 732)
#tr: 1, #tw: 1, #tacl: 4
- Benchmark5:
#tt: 2
- TestObject.field1: 0 (max: 0, min: 0)
#tr: 1, #tw: 1, #tacl: 1
- TestObject.field9: 0 (max: 0, min: 0)
#tr: 1, #tw: 1, #tacl: 1
- Benchmark6:
#tt: 2
- TinyTestObject.field: 1874.07 (max: 2001, min: 816)
#tr: 2, #tw: 2, #tacl: 2
(Note that this is the sum of the results for the same field in two objects.)
Legend: #tt: total number of threads, #tr: number of threads reading the field, #tw: number of threads writing to the field, #tacl: number of threads active in field's cache line.