From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q48GrHuf016928 for ; Tue, 8 May 2012 18:53:17 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgoCAKdOqU/RVaA2imdsb2JhbABEsyUIIgEBAQoJDQcSBiOCDAEBAQQSAiwBGx4DDAYFCw0uIQEBEQEFARwZCBqHXQEDCwucTwkDjCSCc4UrChknDVeIdgEFC4oPaYJsgyYElX6BEYhJgWWDIz2EDQ X-IronPort-AV: E=Sophos;i="4.75,552,1330902000"; d="scan'208";a="142945581" Received: from mail-pb0-f54.google.com ([209.85.160.54]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 08 May 2012 18:53:11 +0200 Received: by pbbro2 with SMTP id ro2so10414904pbb.27 for ; Tue, 08 May 2012 09:53:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=lqFFuWZJj7UVpCqeocSsPk61DQ6Gf3hh4/wYQaFqyjU=; b=GQcAFoudPIqeRMjhot6cT1PwSTixxbWKWN2yZ1IQ8AQiSNjxt6RDNjvSejWiZ5xyCv xgTG+MFFVFiYTkLCdfVhQO5Xg154kVc14D2ftEJ+rmd7i9gwa5E+3Pqc0uYTzV5IdPc7 nsCgWoqT2HPzHdzPXk7K4pmmZpHars9ZyqPwiAyZxAh0xGxZL9ZlDwKnNcst0C34WMLG Do1Yrl47LkvKR1uGNXSwL7AK8gDg84M8nuE0kEjON2s4nA6MjujaOXsdICF6KDQ7ANr+ 2YXLLvPknZtXNaUZ9OyAtkHo+STUpDPeSB0uvYlBdjX0Cr03qjxC0w0VFWovRa0QCTfG xmyw== MIME-Version: 1.0 Received: by 10.68.202.8 with SMTP id ke8mr24776582pbc.94.1336495989997; Tue, 08 May 2012 09:53:09 -0700 (PDT) Received: by 10.68.228.194 with HTTP; Tue, 8 May 2012 09:53:09 -0700 (PDT) In-Reply-To: References: Date: Tue, 8 May 2012 17:53:09 +0100 Message-ID: From: Joel Reymont To: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id q48GrHuf016928 Subject: [Caml-list] Re: caching results of caml_named_value Foot in mouth. The manual says yes. On Tue, May 8, 2012 at 5:50 PM, Joel Reymont wrote: > There's quite a bit of code involved in each call to caml_named_value. > > This includes calling hash_value_name, traversal of the named value > list and a call strcmp for every step of the traversal. > > Is it sensible to cache the valued returned by caml_named_value and > sticking it into an array of closures? > > The array (block) would be registered as global root. > > My use case is caml_named_value being called several times a second, > potentially. > >    Thanks, Joel > > -------------------------------------------------------------------------- > Working on AlgoKit, a new algorithmic trading platform using Rithmic R|API > ---------------------+------------+--------------------------------------- > http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont > ---------------------+------------+--------------------------------------- -- -------------------------------------------------------------------------- Working on AlgoKit, a new algorithmic trading platform using Rithmic R|API ---------------------+------------+--------------------------------------- http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont ---------------------+------------+---------------------------------------