From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA00667 for caml-redistribution; Tue, 29 Dec 1998 14:49:45 +0100 (MET) 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 GAA01376 for ; Mon, 28 Dec 1998 06:06:05 +0100 (MET) Received: from mail001.mediacity.com (mail001.mediacity.com [205.216.172.9]) by nez-perce.inria.fr (8.8.7/8.8.7) with SMTP id GAA18121 for ; Mon, 28 Dec 1998 06:06:02 +0100 (MET) Received: (qmail 28499 invoked from network); 28 Dec 1998 05:10:50 -0000 Received: from cm-208-166-50-223.cableco-op.ispchannel.com (HELO ispchannel.com) (208.166.50.223) by mail001.mediacity.com with SMTP; 28 Dec 1998 05:10:50 -0000 Sender: weis Message-ID: <3686A093.711890B2@ispchannel.com> Date: Sun, 27 Dec 1998 21:03:15 +0000 From: Mark Hayden X-Mailer: Mozilla 4.5 [en] (X11; U; Linux 2.1.132 i586) X-Accept-Language: en MIME-Version: 1.0 To: Michael Hicks CC: Brian Rogoff , caml-list@inria.fr Subject: Re: Subsequence references or substrings in OCaml References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit You'll also find support for management of sub-strings in the Ensemble group communication toolkit written in Ocaml. Most of the data that moves through our protocols is message data contained in 'substring' data structures and so their implementation turns out to heavily impact the performance of the Ensemble protocols. The substring implementation is described in a section of the paper "Distributed Communication in ML", which can be found at http://simon.cs.cornell.edu/Info/People/hayden/publications.htm The "substring" module are in the buffer subdirectory of the Ensemble distribution. --Mark Michael Hicks wrote: > > At 11:27 AM -0800 12/18/98, Brian Rogoff wrote: > >Its simple enough to implement subsequence references as a user defined > >type in OCaml, as I've done, but I am curious about whether anyone else > >who has used similar libraries would find a built-in substring or > >subsequence ref library useful. > > We've done this in our active network implementation to efficiently > implement packet switching. The idea is that when the packet comes in, it > has an Ethernet header that is stripped off before the packet is processed > by the next level in the protocol stack. After doing this, it may turn out > that the packet should be forwarded, in which case a new Ethernet header > needs to be prepended to the currently headerless packet. By using the > substring abstraction, we are able to the prepend efficiently because the > space of the old header may be overwritten. The alternative would have us > allocate a new buffer with the correct header and then copy the old payload > into it. Using substrings is more efficient: there is no wasted copying of > data; this is a time-savings in itself, but it also reduces the frequency > of GC. > > Mike > > ------------------------------------------------------------------------------ > Michael Hicks > Ph.D. candidate, the University of Pennsylvania > mwh@gradient.cis.upenn.edu > "I'm looking over > A three-leaf clover, > That I overlooked be-three ..." -- Bugs Bunny