Re: Lookup variant for IntMap

Simon Jakobi via Libraries <[email protected]> Mon, 16 Aug 2021 20:28:16 +0200
Newsgroups gmane.comp.lang.haskell.libraries
Message-ID <CAGtp2ShiHv4pb_NQG5jGHbviPKhCo=Ph4jW0gp5HZTQofsHxPg@mail.gmail.com>
Am Mo., 16. Aug. 2021 um 17:06 Uhr schrieb Jan-Willem Maessen
<[email protected]>:
>
> Reading the issue and the benchmarks, it seems like the right call here might be to make the "throws error" version the one that defers the failure check, and to use a similar algorithm for update (which must search to the leaf in any case).

update can terminate fast too. See the nomatch case in updateWithKey:
https://hackage.haskell.org/package/containers-0.6.5.1/docs/src/Data.IntMap.Internal.html#update
_______________________________________________
Libraries mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries