Version française
Home     About     Download     Resources     Contact us    
Browse thread
Batteries and portability
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: dmitry grebeniuk <gdsfh1@g...>
Subject: Re: [Caml-list] Batteries and portability
2009/6/13 Peng Zang <peng.zang@gmail.com>:

> Has anyone pushed this patch upstream to the
> camomile author(s)?
>
> It seems like a good change that should be made
> in the original sources to make it more portable...

  This patch is very useful (at least for me; thanks, Tiphaine!),
but it's not performance-wise to make each camomile library
copy behave like this. With this patch, every character
that passes patched function will cause runtime penalty -- one
check for lazy value and one pointer dereference.
  The right fix is to remove the construction of module "Default"
(and its initialization, consequently) from the camomile library.
But this will break api.
  Maybe it will be better to add this patch as a default behavior,
and make a configure option for "new camomile without
Default", so that old software will use slow camomile with lazy
accesses, and new software will use camomile without module
"Default".