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 q48Go9p5016669 for ; Tue, 8 May 2012 18:50:09 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgoCAIZNqU/RVaA2imdsb2JhbABEsyQIIgEBAQoJDQcSBiOCJQIsARseAxIQXQERAQUBV4ddAQMLC5oGgl4JA4wkgnOFMAoZJw1XiHYBBQuNZIMmBJV+gRGISYUIPYQN X-IronPort-AV: E=Sophos;i="4.75,552,1330902000"; d="scan'208";a="142945347" 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:50:03 +0200 Received: by mail-pb0-f54.google.com with SMTP id ro2so10409966pbb.27 for ; Tue, 08 May 2012 09:50:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=3sc1Gq8Q8qPKO9ZEPLup7wdnwYgb2pAp+9Dl6F7+38A=; b=IOWykBLgVwtjxPyHK7zUOm9aPYXlcEFxGa8sidCWaJ+zVjHtpeDqDCGTq+WwFvBftR QhgZgypqbW0xe+6M4OaWkNSKrJSRKsB+SRiXNawmI8V8dRBNl8BW+tUhvXENW4w5EiNG OQkOFM49daFTYZMC5TMF2U3/DI+XG9RISX7mvZacueZn7bVzE9dGZ49nWwiVLcDdmGKV l9ifYKO5NFdTFSmlIU1G1NTKkSazqyck/bPG8I4PjCVdMS1EKHELK/7rNAo1dNQOdXYf iKUP3HyTYfV2x1uIB75Vyor8oOjR+aWHINKMkhjkkWa9KG1tVOc9YeWuAiNT9nKDcG9o QawA== MIME-Version: 1.0 Received: by 10.68.136.69 with SMTP id py5mr10092734pbb.115.1336495803368; Tue, 08 May 2012 09:50:03 -0700 (PDT) Received: by 10.68.228.194 with HTTP; Tue, 8 May 2012 09:50:03 -0700 (PDT) Date: Tue, 8 May 2012 17:50:03 +0100 Message-ID: From: Joel Reymont To: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 Subject: [Caml-list] caching results of caml_named_value 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 ---------------------+------------+---------------------------------------