Commit 319c4da
committed
Add basic OpenStruct benchmarks
All of the benchmarks except for 100x reads show a performance
improvement. If you are reading the data repeatedly, it's still much
better to use Struct or Data.
```
$ benchmark-driver benchmarks/ostruct.yml
Warming up --------------------------------------
new 7.047k i/s - 7.711k times in 1.094212s (141.90μs/i)
attr_write_read 4.904k i/s - 4.910k times in 1.001289s (203.93μs/i)
index_write_attr_read 6.346k i/s - 6.963k times in 1.097167s (157.57μs/i)
null_reads 79.488k i/s - 85.250k times in 1.072495s (12.58μs/i)
10x_reads 6.651k i/s - 7.282k times in 1.094836s (150.35μs/i)
100x_reads 5.136k i/s - 5.150k times in 1.002780s (194.71μs/i)
Calculating -------------------------------------
v0.6.0 local
new 6.938k 33.067k i/s - 21.141k times in 3.047342s 0.639334s
attr_write_read 4.886k 14.021k i/s - 14.711k times in 3.010686s 1.049232s
index_write_attr_read 6.270k 20.225k i/s - 19.039k times in 3.036489s 0.941373s
null_reads 78.351k 77.187k i/s - 238.462k times in 3.043491s 3.089414s
10x_reads 6.518k 13.306k i/s - 19.953k times in 3.061390s 1.499576s
100x_reads 4.454k 2.078k i/s - 15.407k times in 3.459125s 7.414447s
Comparison:
new
local: 33067.2 i/s
v0.6.0: 6937.5 i/s - 4.77x slower
attr_write_read
local: 14020.7 i/s
v0.6.0: 4886.3 i/s - 2.87x slower
index_write_attr_read
local: 20224.7 i/s
v0.6.0: 6270.1 i/s - 3.23x slower
null_reads
v0.6.0: 78351.5 i/s
local: 77186.8 i/s - 1.02x slower
10x_reads
local: 13305.8 i/s
v0.6.0: 6517.6 i/s - 2.04x slower
100x_reads
v0.6.0: 4454.0 i/s
local: 2078.0 i/s - 2.14x slower
```1 parent de7e246 commit 319c4da
1 file changed
+154
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
0 commit comments