From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA06544; Thu, 12 Jul 2001 17:43:33 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA06537 for ; Thu, 12 Jul 2001 17:43:32 +0200 (MET DST) Received: from str12.sobor.org (adsl-63-198-183-99.dsl.snfc21.pacbell.net [63.198.183.99]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f6CFhTb16715 for ; Thu, 12 Jul 2001 17:43:29 +0200 (MET DST) Received: from quasar.ipa.nw.ru (anza.sobor.org [192.168.123.51]) by str12.sobor.org (Postfix) with ESMTP id 06C12AC322 for ; Thu, 12 Jul 2001 08:30:39 -0700 (PDT) Message-ID: <3B4DC560.DFFC1A07@quasar.ipa.nw.ru> Date: Thu, 12 Jul 2001 08:42:24 -0700 From: "Alexander V. Voinov" Organization: Fear of the Lord is the beginning of wisdom X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Cc: caml Subject: Re: [Caml-list] GC and interoperability with C References: <3B493A40.1B2985FE@quasar.ipa.nw.ru> <20010709155900C.garrigue@kurims.kyoto-u.ac.jp> <3B49C748.9CFB4E6@quasar.ipa.nw.ru> <20010710094419W.garrigue@kurims.kyoto-u.ac.jp> <3B4D3A02.77361186@quasar.ipa.nw.ru> <20010712093448.A27282@pauillac.inria.fr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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