From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA28196; Tue, 9 Oct 2001 17:54:33 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA28164 for ; Tue, 9 Oct 2001 17:54:32 +0200 (MET DST) Received: from indigo.recherche.enac.fr (indigo.recherche.enac.fr [195.220.158.66]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f99FsV924275 for ; Tue, 9 Oct 2001 17:54:32 +0200 (MET DST) Received: from mauve.recherche.enac.fr (mail@mauve.recherche.enac.fr [10.31.3.2]) by indigo.recherche.enac.fr (8.8.6 (PHNE_14041)/8.6.11) with ESMTP id RAA27045 for ; Tue, 9 Oct 2001 17:54:31 +0200 (METDST) Received: from beige.recherche.enac.fr ([10.31.1.89] helo=bleu.recherche.enac.fr ident=barnier) by mauve.recherche.enac.fr with smtp (Exim 3.31 #1 (Debian)) id 15qzDC-0006m5-00; Tue, 09 Oct 2001 17:54:30 +0200 Received: by bleu.recherche.enac.fr (sSMTP sendmail emulation); Tue, 9 Oct 2001 17:54:33 +0200 Content-Type: text/plain; charset="iso-8859-1" From: Nicolas barnier Reply-To: barnier@recherche.enac.fr To: "Caml" Subject: [Caml-list] Functors, inlining and Camlp4 Date: Tue, 9 Oct 2001 17:54:32 +0200 X-Mailer: KMail [version 1.2] MIME-Version: 1.0 Message-Id: <0110091754320I.05684@beige> Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Bonjour, I've recently "functorized" some piece of code containing critical fragments (very frequently called and which process data) to broaden its use, and I ended up with an horrible loss of 20% up to 50% (avg 30%) of the execution times for my benchmark. So after profiling and checking the mailing archive, I've figured out that essentially the lack of inlining in functor application was guilty. In one of his answer, Xavier suggested to "manually" inline critical code, which, I guess, means to withdraw the functors and duplicate/specialize the module code. But I'm quite reluctant to mess it up this way. I hardly know anything about Camlp4, but I was wondering if it would be possible to automate this tedious task by preprocessing the sources with this very trendy and (apparently) cool tool - written by who ? ;-) Perhaps could it work for a subset of the functor language ? Any hint from Daniel's fans or even the guru himself ? Thanks -- Nicolas "Jesus saves, but only Buddha makes incremental backups." ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr