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,DNS_FROM_RFC_POST, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 9B75FBB84 for ; Fri, 16 Jan 2009 10:05:38 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhoBAGncb0nRVdsUmGdsb2JhbACTRT4BAQEBAQgJDAcRqzaBA4xnAQMBA4Vv X-IronPort-AV: E=Sophos;i="4.37,276,1231110000"; d="scan'208";a="22568773" Received: from mail-ew0-f20.google.com ([209.85.219.20]) by mail1-smtp-roc.national.inria.fr with ESMTP; 16 Jan 2009 10:05:38 +0100 Received: by ewy13 with SMTP id 13so2126143ewy.9 for ; Fri, 16 Jan 2009 01:05:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=x+ILoL6qqPXN4GxyuFdjQdJKwqCg+UtrJHWWPx9u0r0=; b=Xxs8lSHmkheA9TYHOz3xryyp2P6TPsHN0lTT0UKWVj2mJwa4act7fMChZGf9yDucEa pCoxz/zb7ggqxF2xzE4d5620BzyqwCTEUlZ/8OilNPihSdSssTq3mfYnCUN6uaombouS qJVrRkz133PMWtGf96FXQbMoCpoe87pfQyUes= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=Sbt0RESKSsHx0AYWQ3HOf7kx0VrAaocKz17XlD6GvA7z6rlugQG0Y2S9hIPm0fNhNl HqxHyHw6uINbRlzgkrVUSZs+ylLxqRxvjRWwdGRTaGnoxNkFx/9OfI1rN9OjxOjtlYZx zNIMDtXzn2eb4WcPYficQUdwScHJLT8qMul3Y= Received: by 10.210.117.1 with SMTP id p1mr2844242ebc.180.1232096738107; Fri, 16 Jan 2009 01:05:38 -0800 (PST) Received: by 10.210.88.1 with HTTP; Fri, 16 Jan 2009 01:05:38 -0800 (PST) Message-ID: <527cf6bc0901160105u67e68ea1qb3633cd51f273aa0@mail.gmail.com> Date: Fri, 16 Jan 2009 10:05:38 +0100 From: "blue storm" To: "Hugo Ferreira" Subject: Re: [Caml-list] Optimizing symbolic processing code Cc: "caml-list@inria.fr" In-Reply-To: <4970488C.9080104@inescporto.pt> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4970488C.9080104@inescporto.pt> 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 symbolic:01 caml-list:01 implemented:02 groups:02 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. 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.