From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.8 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 244E7BC37 for ; Sat, 13 Jun 2009 23:44:10 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsICAH+6M0rRVYTzmGdsb2JhbACYBz8BAQEBAQgJDAcTpmeBGI5pAQMCBIQJBQ X-IronPort-AV: E=Sophos;i="4.42,215,1243807200"; d="scan'208";a="28006545" Received: from an-out-0708.google.com ([209.85.132.243]) by mail2-smtp-roc.national.inria.fr with ESMTP; 13 Jun 2009 23:44:09 +0200 Received: by an-out-0708.google.com with SMTP id b38so1598518ana.3 for ; Sat, 13 Jun 2009 14:44:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=FiqodU8DYupX5nKRJwhPqmDibTstRYMtwMcJGfPns6c=; b=ElAIrvybh036DmLOr792+tdNXHb7dXURkb9TSZirDLbAm1BeSCrKOsc4fBiLg5I5yl hcCLV0kQNnB7WBnKhbKvwYXkANMHudjL727GkENCjAR/wtLK5b4b5AdKh2aGwKdrV0t9 9YUP2BxvV7/2CRJjQYm0BWtSbKlKXfBVPKE40= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=vDqT0twmN8pQrezVlamXLCrGLiy0kdIhYo7qy2pMKitzO8KqhboN8F1NNKxnsU3fcv xCWBQEYJas1dlMi8cvmA2GHYajZhTm8yzvxTX5qvKnSEI9G0n+urCgIWweR2JHxr/F3J OqVEGcPo7AFcgoX0qM+AyFLDlVVKzBwznOceE= MIME-Version: 1.0 Received: by 10.100.123.12 with SMTP id v12mr6749719anc.21.1244929448728; Sat, 13 Jun 2009 14:44:08 -0700 (PDT) In-Reply-To: <200906131350.09878.peng.zang@gmail.com> References: <4A30CD39.1010804@irisa.fr> <4A32535F.6020109@irisa.fr> <200906131350.09878.peng.zang@gmail.com> Date: Sun, 14 Jun 2009 00:44:08 +0300 Message-ID: Subject: Re: [Caml-list] Batteries and portability From: dmitry grebeniuk To: peng.zang@gmail.com, caml-list@yquem.inria.fr Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; grebeniuk:01 camomile:01 camomile:01 patched:01 runtime:01 pointer:01 2009:98 peng:98 peng:98 dmitry:01 caml-list:01 portability:02 lazy:02 lazy:02 api:02 2009/6/13 Peng Zang : > 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".