Closed twop closed 2 years ago
After the latest changes the "old" benchmarks for rapid updates has way better numbers:
Method | depth | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|
ProcessMessages | 10 | 163.6 ms | 3.19 ms | 4.47 ms | 24000.0000 | 6333.3333 | 1000.0000 | 75 MB |
ProcessMessages | 15 | 2,639.5 ms | 34.69 ms | 30.75 ms | 300000.0000 | 120000.0000 | 51000.0000 | 829 MB |
Method | depth | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|
ProcessMessages | 10 | 150.0 ms | 0.77 ms | 0.72 ms | 22750.0000 | 6000.0000 | 1000.0000 | 75 MB |
ProcessMessages | 15 | 2,495.9 ms | 24.08 ms | 22.53 ms | 295000.0000 | 116000.0000 | 47000.0000 | 832 MB |
Note that there is no difference In memory consumption but the access to update
and compare
functions and the functions themselves are more efficient. In my guesstimate it went from somewhere 5-7 dynamic dispatches per attribute comparison to about 2-3
found one more improvement
Method | depth | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|
ProcessMessages | 10 | 148.7 ms | 0.79 ms | 0.73 ms | 24500.0000 | 5750.0000 | 1000.0000 | 75 MB |
ProcessMessages | 15 | 2,489.2 ms | 21.22 ms | 19.85 ms | 292000.0000 | 114000.0000 | 48000.0000 | 832 MB |
Also I optimized diffing of attributes so much that it is almost indistinguishable from small scalars
Method | depth | boxed | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
ProcessIncrements | 15 | False | 1.202 s | 0.0102 s | 0.0090 s | 118000.0000 | 37000.0000 | 8000.0000 | 413 MB |
ProcessIncrements | 15 | True | 1.263 s | 0.0074 s | 0.0069 s | 119000.0000 | 42000.0000 | 8000.0000 | 479 MB |
BUT, it does consume significantly less memory which is probably going to be way more important for mobile devices
@twop Do you think you'll have some time soon to complete this PR, or should I fix the failing build and merge it?
I think I will have time this week.
SO we can do two things:
@TimLariviere what are your thoughts?
@twop Good with me :) I'll fix the build and merge then
Detailed description and benchmark results are coming.
here is a preview