Skip to content
  • David Feuer's avatar
    7d03d76b
    Add `alterF` for Data.Map · 7d03d76b
    David Feuer authored
    Use a bit queue to implement `alterF` for `Data.Map`. This is fairly
    competitive with the simple implementation in `Control.Lens.At`
    even with `Int` keys. For keys that are more expensive to compare,
    it should be substantially better. In case of extremely large maps
    that would overflow the bit queue, this falls back to a slower,
    Yoneda-based, implementation. This code is disabled when the word
    size is at least 61, as maps with nearly a quadrillion entries seem
    somewhat unlikely.
    
    Add rules to specialize to `Const` and `Identity` functors.
    
    Add QuickCheck properties to supplement the unit tests, including
    ones that should trigger the rewrite rules and ones that should not.
    
    Remove some more pre-7.0 junk.
    7d03d76b
    Add `alterF` for Data.Map
    David Feuer authored
    Use a bit queue to implement `alterF` for `Data.Map`. This is fairly
    competitive with the simple implementation in `Control.Lens.At`
    even with `Int` keys. For keys that are more expensive to compare,
    it should be substantially better. In case of extremely large maps
    that would overflow the bit queue, this falls back to a slower,
    Yoneda-based, implementation. This code is disabled when the word
    size is at least 61, as maps with nearly a quadrillion entries seem
    somewhat unlikely.
    
    Add rules to specialize to `Const` and `Identity` functors.
    
    Add QuickCheck properties to supplement the unit tests, including
    ones that should trigger the rewrite rules and ones that should not.
    
    Remove some more pre-7.0 junk.
Loading