FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Some minor reductions in memory allocations by jeremy-visionaid · Pull Request #174 · openmcdf/openmcdf · GitHub

Some minor reductions in memory allocations - #174

Merged
ironfede merged 2 commits into
openmcdf:masterfrom
Visionaid-International-Ltd:memory
Oct 3, 2024
Merged

ironfede merged 2 commits into
openmcdf:masterfrom
Visionaid-International-Ltd:memory

Conversation

Copy link
Copy Markdown
Collaborator

No description provided.

jeremy-visionaid commented Oct 3, 2024
edited
Loading

Copy link
Copy Markdown
Collaborator Author

@ironfede Just for a quick check for perf/memory usage improvements so far:

v2.3.1.0

| Method | BufferSize | TotalStreamSize | Mean        | Error     | StdDev    | Gen0      | Gen1     | Gen2     | Allocated |
|------- |----------- |---------------- |------------:|----------:|----------:|----------:|---------:|---------:|----------:|
| Test   | 1048576    | 1048576         |    187.9 us |   3.71 us |   8.14 us |  137.6953 |  68.6035 |        - |    1.1 MB |
| Test   | 524288     | 1048576         |    196.9 us |   3.85 us |   5.39 us |  140.1367 |  55.1758 |        - |   1.12 MB |
| Test   | 262144     | 1048576         |    219.8 us |   2.81 us |   2.76 us |  144.2871 |  72.0215 |        - |   1.15 MB |
| Test   | 131072     | 1048576         |    276.2 us |   5.04 us |   4.47 us |  152.8320 |  76.1719 |        - |   1.22 MB |
| Test   | 4096       | 1048576         |  3,899.4 us |  74.65 us |  69.83 us |  671.8750 | 335.9375 |        - |   5.41 MB |
| Test   | 1024       | 1048576         | 15,455.3 us | 141.46 us | 125.40 us | 2281.2500 | 375.0000 | 156.2500 |  18.37 MB |
| Test   | 512        | 1048576         | 30,795.2 us | 614.23 us | 880.90 us | 4468.7500 | 437.5000 | 187.5000 |  35.66 MB |

visionaid/memory

| Method | BufferSize | TotalStreamSize | Mean        | Error     | StdDev    | Median      | Gen0      | Gen1     | Gen2     | Allocated |
|------- |----------- |---------------- |------------:|----------:|----------:|------------:|----------:|---------:|---------:|----------:|
| Test   | 1048576    | 1048576         |    143.1 us |   2.58 us |   2.41 us |    143.0 us |  137.2070 |  58.8379 |        - |    1.1 MB |
| Test   | 524288     | 1048576         |    152.8 us |   2.85 us |   2.93 us |    153.1 us |  139.1602 |  57.1289 |        - |   1.11 MB |
| Test   | 262144     | 1048576         |    177.9 us |   3.40 us |   2.84 us |    178.4 us |  143.5547 |  71.7773 |        - |   1.15 MB |
| Test   | 131072     | 1048576         |    223.3 us |   4.42 us |   6.20 us |    220.7 us |  151.8555 |  75.9277 |        - |   1.21 MB |
| Test   | 4096       | 1048576         |  2,846.8 us |  52.94 us |  46.93 us |  2,832.3 us |  675.7813 | 335.9375 |        - |    5.4 MB |
| Test   | 1024       | 1048576         | 11,435.8 us | 225.95 us | 476.61 us | 11,243.3 us | 2296.8750 | 375.0000 | 140.6250 |  18.35 MB |
| Test   | 512        | 1048576         | 21,693.7 us | 263.82 us | 246.78 us | 21,761.8 us | 4437.5000 | 343.7500 | 156.2500 |  35.63 MB |

For small buffers, I find performance is improved ~30% or so since v2.3.1. Not too shabby!

I reckon I can get the memory usage right down after the next round of changes are merged :)

ironfede merged commit 00f260c into openmcdf:master Oct 3, 2024
jeremy-visionaid deleted the memory branch October 16, 2024 07:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL