forked from RuedigerMoeller/fast-serialization
-
Notifications
You must be signed in to change notification settings - Fork 0
/
structiter.html
69 lines (69 loc) · 7.68 KB
/
structiter.html
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
68
69
<html>
<i>intel i7 3770K 3,5 ghz, 4 core, 8 threads</i><br>
<i>1.7.0_51-b13,Java HotSpot(TM) 64-Bit Server VM,Windows 8</i><br>
<br><h4>Instantiation Time (CMS Collector)</h4>
Duration to allocate and initialize an array[500000] of complex Objects (TestInstrument containing a list of embedded TestInstrumentLeg Objects).<br>
Note: Instantiation time differs depending on GC-Algorithm, difference in Full GC stays across DefaultGC, CMS and G1. G1 and Default GC are significantly faster in on-heap allocation. <br><br>
<b>time(ms) smaller is better</b>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td><font size=1 color=#7070a0>
██████████████████████████████</font> <font size=2><b>On Heap (excl. GC cost) (604)</b></font></td></tr>
<tr><td><font size=1 color=#70a070>
█████████████████████████▌</font> <font size=2><b>Structs (*) (514)</b></font></td></tr>
</table><br>
<b>Time of Full GC (ms)</b>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td><font size=1 color=#7070a0>
███████████████████████████████</font> <font size=2><b>On heap (1551)</b></font></td></tr>
<tr><td><font size=1 color=#7070a0>
</font> <font size=2><b>Structs (3)</b></font></td></tr>
</table><br>
<br><h4>Iterate primitive Arrays</h4>
benchmark performance of calculating the sum of all elements of an embedded int array.<br><br>
<b></b>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td><font size=1 color=#7070a0>
██████▌</font> <font size=2><b>on heap (65)</b></font></td></tr>
<tr><td><font size=1 color=#70a070>
████████████▌</font> <font size=2><b>structs identical code (125)</b></font></td></tr>
<tr><td><font size=1 color=#70a070>
██████▌</font> <font size=2><b>structs using pointers instead of get(index) (66)</b></font></td></tr>
</table><br>
<br><h4>1st level member access</h4>
iterate structure array and access an integer member variable of each.<br><br>
<b></b>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td><font size=1 color=#7070a0>
███████</font> <font size=2><b>on heap get(index).getIntVar() (145)</b></font></td></tr>
<tr><td><font size=1 color=#70a070>
█████████████████████████████████████████▌</font> <font size=2><b>structs get(index).getIntVar() (837)</b></font></td></tr>
<tr><td><font size=1 color=#70a070>
█████▌</font> <font size=2><b>structs pointer.getIntVar() (112)</b></font></td></tr>
</table><br>
<br><h4>3rd level embedded substructure access</h4>
iterate structure array, access each element of an embedded substructure's int array.<br><br>
<b></b>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td><font size=1 color=#7070a0>
██████</font> <font size=2><b>on heap version (621)</b></font></td></tr>
<tr><td><font size=1 color=#70a070>
██████████████████▌</font> <font size=2><b>structs identical code to onheap (1861)</b></font></td></tr>
<tr><td><font size=1 color=#70a070>
██████████</font> <font size=2><b>structs using pointers for iteration (1013)</b></font></td></tr>
<tr><td><font size=1 color=#70a070>
██▌</font> <font size=2><b>structs using pointers for all accesses + inlined method (276)</b></font></td></tr>
</table><br>
<br><h4>Linear search for first instrument in array with name.equals(given string)</h4>
iterate structure array, access a string enbedded in each element and compare it.<br><br>
<b></b>
<table border=0 cellpadding=0 cellspacing=0>
<tr><td><font size=1 color=#7070a0>
█████████████████████████████████████████████████████████████████████████████████████████████████▌</font> <font size=2><b>on heap (975)</b></font></td></tr>
<tr><td><font size=1 color=#70a070>
███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▌</font> <font size=2><b>structs identical code (1237)</b></font></td></tr>
<tr><td><font size=1 color=#70a070>
███████████████████████████████████████████████████████████████████████████████████████████████████████▌</font> <font size=2><b>structs using pointers (1039)</b></font></td></tr>
<tr><td><font size=1 color=#70a070>
██████████████████████████████████████████████████████████████████▌</font> <font size=2><b>structs using direct pointer to embedded string (668)</b></font></td></tr>
</table><br>
</html>