You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -121,50 +121,50 @@ The attributes are reordered from largest to smallest size (first double, then f
121
121
This minimizes the amount of padding required, making the structure more compact in memory.
122
122
On a more technical level, when performing operations on the attributes, the machine code will perform register lookups starting from rax (rax+4, rax+20...) with fewer shifts, and thus more efficiently, if the attributes are properly ordered.
std::cout << "OOP (Good Order by DOP and Foo Padding) CPU cycles: " << (end_cycles - start_cycles) << "\n";
226
+
std::cout << "OOP (Good Order by DOP and Foo Padding) Execution time: " << elapsedOOPDOP_GoodWithFooPadding.count() << " seconds\n";
227
227
```
228
228
```text
229
229
OOP (Good Order by DOP and Foo Padding) CPU cycles: 14294218
@@ -233,8 +233,8 @@ OOP (Good Order by DOP and Foo Padding) Execution time: 0.00531921 seconds
233
233
Even faster. We have found an evidence to the presented hypotesis. Lets summarize the resultd:
234
234
235
235
```cpp
236
-
std::cout << "With DOP, the processing is " << (elapsedOOPBad.count() - elapsedOOPDOP.count()) * 1e3 << " ms faster\n";
237
-
std::cout << "With DOP and Foo Padding, the processing is " << (elapsedOOPBad.count() - elapsedOOPDOP_GoodWithFooPadding.count()) * 1e3 << " ms faster\n";
236
+
std::cout << "With DOP, the processing is " << (elapsedOOPBad.count() - elapsedOOPDOP.count()) * 1e3 << " ms faster\n";
237
+
std::cout << "With DOP and Foo Padding, the processing is " << (elapsedOOPBad.count() - elapsedOOPDOP_GoodWithFooPadding.count()) * 1e3 << " ms faster\n";
238
238
```
239
239
```text
240
240
With DOP, the processing is 0.931258 ms faster
@@ -245,7 +245,7 @@ With DOP and Foo Padding, the processing is 1.36449 ms faster
245
245
246
246
One may wonder, but what if this was something more casual than causal? And what if it was just a quick coincidence? We can run this $$n$$ times to see if Gauss is on our side (is it true that DOP works or not?).
247
247
248
-
Graph results after running the test many (1000) times and analyzing which methods were the fastest:
248
+
Below are the graph results after running the test many (1000) times and analyzing which methods were the fastest. There are three methods and three positions (gold, silver, and bronze), depending on which method was the fastest or slowest. The graphs show a summary of the positions in which each method ended up in all the iterations.
0 commit comments