|Anonymous | Login | Signup for a new account||2015-10-13 13:59 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005792||OCaml||OCaml standard library||public||2012-10-16 01:34||2013-06-07 19:03|
|Priority||normal||Severity||feature||Reproducibility||have not tried|
|Target Version||Fixed in Version|
|Summary||0005792: request for Weak.set_some function|
|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]
|Tags||No tags attached.|
I would be also glad also to have such a function.
1) 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.
2) It is a trivial addition.
3) 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%.
|2012-10-16 01:34||sweeks||New Issue|
|2013-06-06 11:56||bjeannet||Note Added: 0009420|
|2013-06-07 19:03||xleroy||Assigned To||=> doligez|
|2013-06-07 19:03||xleroy||Status||new => acknowledged|
|Copyright © 2000 - 2011 MantisBT Group|