-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mutation: Use chunk-based mutation approach for Map
The previous Map mutator performed both single element as well as chunk mutations, which isn't necessary now that we can bias chunks towards being small. The old implementation didn't check that `initInPlace` and `read` obeyed the specified `minSize`. Since non-zero `minSize`s can be problematic in `read`, they are not supported for now. There were also a few issues with key mutations: Instead of retrying key creation separately for each key, which can result in a large amount of wasted attempts if the key set is almost saturated, all such attempts now share a single failure counter. Keys are now properly detached before being mutated, which is necessary if map keys are mutable. The fallback to value mutation if key mutation failed also didn't behave correctly: It called `setValue` on a newly allocated `Map.Entry`, which is a noop. The number of iterations in the StressTest is halved to prevent OOMs on the runners.
- Loading branch information
Showing
7 changed files
with
506 additions
and
335 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.