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=1.7 required=5.0 tests=AWL,SPF_SOFTFAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr 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 B7006BB84 for ; Fri, 16 Jan 2009 10:44:49 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmQBAO7lb0nVhjEYkWdsb2JhbACUAwEBAQEJCwoHEQO5E4Vy X-IronPort-AV: E=Sophos;i="4.37,276,1231110000"; d="scan'208";a="19695075" Received: from ihsmtp02voda.lis.interhost.com (HELO ihsmtp02cons.lis.interhost.com) ([213.134.49.24]) by mail2-smtp-roc.national.inria.fr with ESMTP; 16 Jan 2009 10:44:49 +0100 Received: from [192.168.1.64] ([77.54.249.136]) by ihsmtp02cons.lis.interhost.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 16 Jan 2009 09:42:12 +0000 Message-ID: <4970570F.3070004@inescporto.pt> Date: Fri, 16 Jan 2009 09:44:47 +0000 From: Hugo Ferreira User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: blue storm Cc: "caml-list@inria.fr" Subject: Re: [Caml-list] Optimizing symbolic processing code References: <4970488C.9080104@inescporto.pt> <527cf6bc0901160105u67e68ea1qb3633cd51f273aa0@mail.gmail.com> In-Reply-To: <527cf6bc0901160105u67e68ea1qb3633cd51f273aa0@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 16 Jan 2009 09:42:12.0435 (UTC) FILETIME=[B5341230:01C977BE] X-Spam: no; 0.00; inference:01 inference:01 compiler:01 low-level:01 ocaml:01 ocaml:01 compiler:01 storm:98 prolog:01 prolog:01 wrote:01 wrote:01 symbolic:01 caml-list:01 algorithm:01 blue storm wrote: > On 1/16/09, Hugo Ferreira wrote: >> I have implemented a simple Prolog like inference engine >> to be used in machine learning algorithms (ILP). My first >> basic test shows that inference is dismally slow (compared >> to a Prolog compiler). Consequently I am looking for >> information on optimizing the code. > > Before trying low-level optimizations, i suggest you check carefully > your implementation. It's a bit strange that your performance is so > bad, and i suspect there could be improvement of algorithmic nature. > Don't think it is algorithmic. The test specifically targets the discriminant tree I developed according to the descriptions found in various articles. Note that the Prolog implementation tested also requires some time to solve the problem. Now, I don't expect to have the same performance as an optimized inference engine but... its so much slower. > There have been successful translations of Prolog to OCaml before : > http://groups.google.com/group/comp.lang.prolog/msg/28c4361bb5f865b8?pli=1 > , wich is quite different as it uses the ocaml compiler itself to get > good performances. > Yes I know of this. However the need to some additional stuff (forward clause subsumption testing, coverage counting, clause ranking, etc.) that are specific to the learning algorithm has prompted me to develop this code. Regards, Hugo F.