Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Joel Reymont <joelr1@gmail.com>
To: caml-list@inria.fr
Subject: [Caml-list] caching results of caml_named_value
Date: Tue, 8 May 2012 17:50:03 +0100	[thread overview]
Message-ID: <CAOQwdX3qqXphEx=TJLmMGb1hGZG-ey+O_mcANXb08wzKJKBegQ@mail.gmail.com> (raw)

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
---------------------+------------+---------------------------------------

             reply	other threads:[~2012-05-08 16:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-08 16:50 Joel Reymont [this message]
2012-05-08 16:53 ` [Caml-list] " Joel Reymont

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOQwdX3qqXphEx=TJLmMGb1hGZG-ey+O_mcANXb08wzKJKBegQ@mail.gmail.com' \
    --to=joelr1@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox