diff --git a/doc/tut-10-send-reuse-heaps-after.svg b/doc/tut-10-send-reuse-heaps-after.svg index a9be7b795..5330d292a 100644 --- a/doc/tut-10-send-reuse-heaps-after.svg +++ b/doc/tut-10-send-reuse-heaps-after.svg @@ -6,7 +6,7 @@ - 2024-01-25T14:30:38.166128 + 2024-01-25T14:51:09.299431 image/svg+xml @@ -42,7 +42,7 @@ z +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -129,7 +129,7 @@ z +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -165,7 +165,7 @@ z +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -207,7 +207,7 @@ z +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -254,7 +254,7 @@ z +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -281,7 +281,7 @@ z +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -337,7 +337,7 @@ z +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -384,7 +384,7 @@ z +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -422,7 +422,7 @@ z +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -437,7 +437,7 @@ L 457.653651 12.96 +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -452,7 +452,7 @@ L 502.681837 12.96 +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -467,7 +467,7 @@ L 547.710023 12.96 +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -482,7 +482,7 @@ L 592.738208 12.96 +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -497,7 +497,7 @@ L 637.766394 12.96 +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -512,7 +512,7 @@ L 682.794579 12.96 +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -527,7 +527,7 @@ L 97.428167 12.96 +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -542,7 +542,7 @@ L 142.456352 12.96 +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -557,7 +557,7 @@ L 187.484538 12.96 +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -572,7 +572,7 @@ L 232.512724 12.96 +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -587,7 +587,7 @@ L 277.540909 12.96 +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -602,7 +602,7 @@ L 322.569095 12.96 +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -617,7 +617,7 @@ L 367.59728 12.96 +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -632,7 +632,7 @@ L 412.625466 12.96 +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -647,7 +647,7 @@ L 457.653651 12.96 +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -662,7 +662,7 @@ L 502.681837 12.96 +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -677,7 +677,7 @@ L 547.710023 12.96 +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -692,7 +692,7 @@ L 592.738208 12.96 +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -707,7 +707,7 @@ L 637.766394 12.96 +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -1056,7 +1056,7 @@ z +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -1096,7 +1096,7 @@ z +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -1126,7 +1126,7 @@ z +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -1169,7 +1169,7 @@ z +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -1220,7 +1220,7 @@ z +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -1257,7 +1257,7 @@ z +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -1300,7 +1300,7 @@ z +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -1351,7 +1351,7 @@ z +" clip-path="url(#p0c4c0408ab)" style="fill: none; stroke: #ffffff; stroke-linecap: round"/> @@ -1506,7 +1506,7 @@ C 94.744266 269.841734 94.428167 270.604864 94.428167 271.400474 C 94.428167 272.196083 94.744266 272.959213 95.306847 273.521794 C 95.869427 274.084375 96.632558 274.400474 97.428167 274.400474 z -" clip-path="url(#p4fbe65ef8b)" style="fill: #4c72b0; stroke: #ffffff; stroke-width: 0.48"/> +" clip-path="url(#p0c4c0408ab)" style="fill: #4c72b0; stroke: #ffffff; stroke-width: 0.48"/> +" clip-path="url(#p0c4c0408ab)" style="fill: #4c72b0; stroke: #ffffff; stroke-width: 0.48"/> +" clip-path="url(#p0c4c0408ab)" style="fill: #4c72b0; stroke: #ffffff; stroke-width: 0.48"/> +" clip-path="url(#p0c4c0408ab)" style="fill: #4c72b0; stroke: #ffffff; stroke-width: 0.48"/> +" clip-path="url(#p0c4c0408ab)" style="fill: #4c72b0; stroke: #ffffff; stroke-width: 0.48"/> +" clip-path="url(#p0c4c0408ab)" style="fill: #4c72b0; stroke: #ffffff; stroke-width: 0.48"/> +" clip-path="url(#p0c4c0408ab)" style="fill: #4c72b0; stroke: #ffffff; stroke-width: 0.48"/> +" clip-path="url(#p0c4c0408ab)" style="fill: #4c72b0; stroke: #ffffff; stroke-width: 0.48"/> +" clip-path="url(#p0c4c0408ab)" style="fill: #4c72b0; stroke: #ffffff; stroke-width: 0.48"/> +" clip-path="url(#p0c4c0408ab)" style="fill: #4c72b0; stroke: #ffffff; stroke-width: 0.48"/> +" clip-path="url(#p0c4c0408ab)" style="fill: #4c72b0; stroke: #ffffff; stroke-width: 0.48"/> +" clip-path="url(#p0c4c0408ab)" style="fill: #4c72b0; stroke: #ffffff; stroke-width: 0.48"/> +" clip-path="url(#p0c4c0408ab)" style="fill: #4c72b0; stroke: #ffffff; stroke-width: 0.48"/> - - - - - - - - - - - - - - +" clip-path="url(#p0c4c0408ab)" style="fill: #4c72b0; stroke: #ffffff; stroke-width: 0.48"/> + + + + + + + + + + + + + + @@ -1964,7 +1964,7 @@ z - - + @@ -2061,7 +2061,7 @@ z - - + @@ -2133,7 +2133,7 @@ z - + diff --git a/doc/tut-10-send-reuse-heaps-after.txt b/doc/tut-10-send-reuse-heaps-after.txt index 34ee0c62d..c9d4629b6 100644 --- a/doc/tut-10-send-reuse-heaps-after.txt +++ b/doc/tut-10-send-reuse-heaps-after.txt @@ -12,17 +12,17 @@ Python 512 8388608 6318.37 MB/s Python 256 16777216 5932.00 MB/s Python 128 33554432 5935.06 MB/s Python 64 67108864 5937.57 MB/s -C++ 524288 8192 3265.85 MB/s -C++ 262144 16384 3444.7 MB/s -C++ 131072 32768 4272.19 MB/s -C++ 65536 65536 5097.92 MB/s -C++ 32768 131072 2568.14 MB/s -C++ 16384 262144 6332.33 MB/s -C++ 8192 524288 2670.22 MB/s -C++ 4096 1048576 2685.65 MB/s -C++ 2048 2097152 2711.55 MB/s -C++ 1024 4194304 2660.13 MB/s -C++ 512 8388608 2466.87 MB/s -C++ 256 16777216 2348.91 MB/s -C++ 128 33554432 2242.47 MB/s -C++ 64 67108864 2058.26 MB/s +C++ 524288 8192 3298.72 MB/s +C++ 262144 16384 3474.66 MB/s +C++ 131072 32768 4309.18 MB/s +C++ 65536 65536 5130.36 MB/s +C++ 32768 131072 5907.07 MB/s +C++ 16384 262144 6403.08 MB/s +C++ 8192 524288 6705.34 MB/s +C++ 4096 1048576 6839.93 MB/s +C++ 2048 2097152 6969.65 MB/s +C++ 1024 4194304 6958.72 MB/s +C++ 512 8388608 6143.76 MB/s +C++ 256 16777216 5694.86 MB/s +C++ 128 33554432 5681.89 MB/s +C++ 64 67108864 5666.55 MB/s diff --git a/doc/tut-10-send-reuse-heaps.rst b/doc/tut-10-send-reuse-heaps.rst index 40a63e3f8..6094c6b12 100644 --- a/doc/tut-10-send-reuse-heaps.rst +++ b/doc/tut-10-send-reuse-heaps.rst @@ -163,7 +163,7 @@ code above): first_heap.add_item( adc_samples_desc.id, states[0].adc_samples.data(), - states[0].adc_samples.size() * sizeof(states[0].adc_samples.size()), + states[0].adc_samples.size() * sizeof(states[0].adc_samples[0]), true ); @@ -205,6 +205,9 @@ And now let's see the results again: .. image:: tut-10-send-reuse-heaps-after.svg +This is a major improvement for small heaps, but we still don't have the same +performance for small heaps that we get for larger heaps. + .. [#zdarr] A numpy zero-dimensional array is similar to a scalar, but it is mutable. We will need that capability later to update the value in place. diff --git a/examples/tut_10_send_reuse_heaps.cpp b/examples/tut_10_send_reuse_heaps.cpp index 9590fcbd6..cae53ddc6 100644 --- a/examples/tut_10_send_reuse_heaps.cpp +++ b/examples/tut_10_send_reuse_heaps.cpp @@ -131,7 +131,7 @@ int main(int argc, char * const argv[]) first_heap.add_item( adc_samples_desc.id, states[0].adc_samples.data(), - states[0].adc_samples.size() * sizeof(states[0].adc_samples.size()), + states[0].adc_samples.size() * sizeof(states[0].adc_samples[0]), true );