Closed qmfrederik closed 6 years ago
Method | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|
WriteLargePropertylistTest | 1.831 s | 0.0361 s | 0.0721 s | 53187.5000 | 375.0000 | 62.5000 | 319.66 MB |
Method | Mean | Error | StdDev | Gen 0 | Gen 1 | Allocated |
---|---|---|---|---|---|---|
ReadLargePropertylistTest | 1.587 ms | 0.0335 ms | 0.0755 ms | 117.1875 | 54.6875 | 720.21 KB |
@claunia This one is ready to go I think 😄 . I'll then finish #38 and that would be a great starting point for a new release.
There may be a couple of follow up PRs the next couple of weeks but these changes already have a very big performance impact.
OK, build is looking green again. The benchmarks which I added perform so badly on the master branch that they caused the Travis build to time out :)
This PR improves the performance of the BinaryPropertyListWriter by using a
Dictionary<NSObject, int>
to store the indices of binary objects instead of aCollection<NSObject>
. It removes the need to do anIndexOf
, which scans the entire list. That is a very expensive O(N) operation.This results in a 97% performance improvement on Windows (i.e. 30 times as fast) and a 98% performance improvement on Linux.