Browse thread
Optimizing symbolic processing code
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2009-01-16 (13:38) |
From: | Jon Harrop <jon@f...> |
Subject: | Re: [Caml-list] Optimizing symbolic processing code |
On Friday 16 January 2009 08:42:52 Hugo Ferreira wrote: > Hello, > > 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). Can you quantify that? > Consequently I am looking for information on optimizing the code. IIRC, the single most productive optimization I made to the Mathematica implementation I wrote in OCaml was to check when recursive rewrites were leaving an expression unaltered and return the original when possible to avoid copying. I don't know if that is relevant here. Also IIRC, someone else wrote that they lashed together a quick Prolog implementation in OCaml and were surprised to find it outperforming real Prolog compilers. > I have found: > > http://ocaml.janestreet.com/?q=node/30 > http://camltastic.blogspot.com/2008/05/optimizing-memory-allocation-and-loo >ps.html > > Does anyone have any other links or articles I may look at? The articles on low-level optimization in the OCaml Journal are almost certainly relevant. OCaml for Scientists covers data structure performance in detail. No other sources are as comprehensive with regard to optimization AFAIK. -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e