Original bug ID: 7309 Reporter:@bobzhang Status: resolved (set by @alainfrisch on 2017-02-28T13:15:59Z) Resolution: fixed Priority: normal Severity: feature Fixed in version: 4.06.0 +dev/beta1/beta2/rc1 Category: standard library Has duplicate:#8223 Related to:#5220 Monitored by: "Boris Yakokobowski"
Bug description
type would be
val update: key -> ('a option -> 'a) -> 'a t -> 'a t
the rational is mostly for performance, this API is also available in Haskell
I'd be interested to see benchmarks to illustrate the gains. Avoiding an extra (allocation-free) lookup could be somehow compensated by the extra allocations for the closure and the option type. Or could flambda get rid of them?
note that exception is not cheap in JS backend, while update is a quite common paradigm,
I am in favor of having a update function which does not rely on exception, but it is still a good step that we have a update function whether it relies on exception or not
Original bug ID: 7309
Reporter: @bobzhang
Status: resolved (set by @alainfrisch on 2017-02-28T13:15:59Z)
Resolution: fixed
Priority: normal
Severity: feature
Fixed in version: 4.06.0 +dev/beta1/beta2/rc1
Category: standard library
Has duplicate: #8223
Related to: #5220
Monitored by: "Boris Yakokobowski"
Bug description
type would be
val update: key -> ('a option -> 'a) -> 'a t -> 'a t
the rational is mostly for performance, this API is also available in Haskell
https://downloads.haskell.org/~ghc/6.12.3/docs/html/libraries/containers-0.3.0.0/Data-Map.html#6
The text was updated successfully, but these errors were encountered: