Anonymous | Login | Signup for a new account | 2019-02-20 14:29 CET | ![]() |
Main | My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||
0004591 | OCaml | ~DO NOT USE (was: OCaml general) | public | 2008-07-28 23:44 | 2011-12-21 11:38 | |||
Reporter | technophobicgeek | |||||||
Assigned To | xleroy | |||||||
Priority | normal | Severity | feature | Reproducibility | always | |||
Status | closed | Resolution | fixed | |||||
Platform | OS | OS Version | ||||||
Product Version | 3.10.3+dev | |||||||
Target Version | Fixed in Version | 3.13.0+dev | ||||||
Summary | 0004591: A faster version of Array.sub implemented in C | |||||||
Description | This is a C implementation of Array.sub, which I believe should deal with some of the inefficiencies in the current OCaml implementation of Array.sub in the OCaml std library. From the discussion on the caml-list This code is patterned after caml_make_vect function in the OCaml compiler. I don't think that C is the main reason for the improvement, it's more fundamental: 1) The OCaml library version of Array.sub creates an array, ***initializes it***, and then copies to it. The initialization is quite unnecessary, and algorithmically makes the function about twice as expensive as it should be. 2) From reading OCaml source code, it looks like caml_initialize is a much cheaper function to use than caml_modify due to GC issues. Yet, the OCaml library version uses caml_modify by initializing the target array with a default value first, instead of using the source array to initialize. I guess this is why on profiling, caml_modify shows up as really expensive, paired with lots of GC calls. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ![]() | |||||||
![]() |
|||||||||||
|
![]() |
|
(0006432) xleroy (administrator) 2011-12-21 11:38 |
Faster implementations of "Array.blit", "Array.copy", "Array.sub", "Array.append" and "Array.concat" now integrated in SVN trunk (commit 11913). |
![]() |
|||
Date Modified | Username | Field | Change |
2008-07-28 23:44 | technophobicgeek | New Issue | |
2008-07-28 23:44 | technophobicgeek | File Added: array_sub.c | |
2008-08-05 18:30 | xleroy | Assigned To | => xleroy |
2008-08-05 18:30 | xleroy | Status | new => acknowledged |
2008-08-07 14:12 | xleroy | Relationship added | related to 0002787 |
2008-08-07 14:12 | xleroy | Relationship added | related to 0002395 |
2011-12-21 11:38 | xleroy | Note Added: 0006432 | |
2011-12-21 11:38 | xleroy | Status | acknowledged => closed |
2011-12-21 11:38 | xleroy | Resolution | open => fixed |
2011-12-21 11:38 | xleroy | Fixed in Version | => 3.13.0+dev |
2017-02-23 16:36 | doligez | Category | OCaml general => -OCaml general |
2017-03-03 17:55 | doligez | Category | -OCaml general => -(deprecated) general |
2017-03-03 18:01 | doligez | Category | -(deprecated) general => ~deprecated (was: OCaml general) |
2017-03-06 17:04 | doligez | Category | ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general) |
Copyright © 2000 - 2011 MantisBT Group |