* [Caml-list] caching results of caml_named_value
@ 2012-05-08 16:50 Joel Reymont
2012-05-08 16:53 ` [Caml-list] " Joel Reymont
0 siblings, 1 reply; 2+ messages in thread
From: Joel Reymont @ 2012-05-08 16:50 UTC (permalink / raw)
To: caml-list
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
---------------------+------------+---------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Caml-list] Re: caching results of caml_named_value
2012-05-08 16:50 [Caml-list] caching results of caml_named_value Joel Reymont
@ 2012-05-08 16:53 ` Joel Reymont
0 siblings, 0 replies; 2+ messages in thread
From: Joel Reymont @ 2012-05-08 16:53 UTC (permalink / raw)
To: caml-list
Foot in mouth.
The manual says yes.
On Tue, May 8, 2012 at 5:50 PM, Joel Reymont <joelr1@gmail.com> 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
---------------------+------------+---------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-08 16:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-08 16:50 [Caml-list] caching results of caml_named_value Joel Reymont
2012-05-08 16:53 ` [Caml-list] " Joel Reymont
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox