Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005792OCamlOCaml standard librarypublic2012-10-16 01:342013-06-07 19:03
Reportersweeks 
Assigned Todoligez 
PrioritynormalSeverityfeatureReproducibilityhave not tried
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0005792: request for Weak.set_some function
DescriptionCould 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.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0009420)
bjeannet (reporter)
2013-06-06 11:56

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%.

- Issue History
Date Modified Username Field Change
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
Powered by Mantis Bugtracker