Browse thread
[Caml-list] GC and interoperability with C
-
Alexander V. Voinov
-
Jacques Garrigue
- Alexander V. Voinov
-
Alexander V. Voinov
-
Xavier Leroy
- Alexander V. Voinov
-
Xavier Leroy
-
Jacques Garrigue
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Alexander V. Voinov <avv@q...> |
| Subject: | Re: [Caml-list] GC and interoperability with C |
Hi Xavier, Xavier Leroy wrote: > > > I've played a bit with this, and I have an observation that huge amount > > of time is spent on remove_global_root(a). > > I'm not surprised :-) Currently, remove_global_root is implemented by > linear search in a singly-linked list... > > I believe you're the first to really stress-test remove_global_root; > most OCaml applications just register a dozen external roots and never > remove them. > > I'll improve the implementation when I find some free time. Thank you. At least I'm glad to know that you do not dismiss the very idea as described and the like: there are many various [data structure] packages in C/C++, floating around, and in a part of cases it would be better just to interface them than to reimplement. As an intermediate solution, if you implement a kind of 'remove_many_roots', taking an array of pointers, I will adapt my code to make use of this serialization. That is I will accumulate this array until it overflows and then process in one shot. Alexander ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr