You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 5792 Reporter: sweeks Assigned to:@damiendoligez Status: resolved (set by @alainfrisch on 2016-12-08T10:42:57Z) Resolution: suspended Priority: normal Severity: feature Category: standard library
Bug description
Could we get the following function added to the [Weak] module?
val set_some : 'a t -> int -> 'a -> unit
It would satisfy the equation:
set_some t i a = set t i (Some a)
but would have the benefit that one is not forced to allocate a [Some]
block.
The text was updated successfully, but these errors were encountered:
I would be also glad also to have such a function.
It is not practical to implement it as a normal programmer, because one needs access to .h files that are not installed by the compiler.
It is a trivial addition.
I tried it (by modifying directly byterun/weak.c), and on a benchmark where I used to Weak arrays for memoization (modification of Filliatre BDD library), I gained 10%.
Original bug ID: 5792
Reporter: sweeks
Assigned to: @damiendoligez
Status: resolved (set by @alainfrisch on 2016-12-08T10:42:57Z)
Resolution: suspended
Priority: normal
Severity: feature
Category: standard library
Bug description
Could we get the following function added to the [Weak] module?
val set_some : 'a t -> int -> 'a -> unit
It would satisfy the equation:
set_some t i a = set t i (Some a)
but would have the benefit that one is not forced to allocate a [Some]
block.
The text was updated successfully, but these errors were encountered: