Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Ask for a more efficient way to deallocate memory (full version)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-12-10 (23:08)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] Ask for a more efficient way to deallocate memory (full version)
On Monday 10 December 2007 22:13, Oliver Bandel wrote:
> Because I don't know how it's implemented, I don't know if this adds a
> performance lack. But possibly it would make sense to look at it closer
> to explore it's advantages and disadvantages...
> ...but I've no experience in OCaml extension, so I hope someone here can
> say some wprds about it.

OCaml has a great macro system called camlp4 that lets you add new syntactic 
constructs and rewrite OCaml code at will. So Martin's code adds a new 
syntactic construct and automatically injects the code for the compiler that 
we must currently write by hand. Consequently, its performance will be 
superb: as good as hand-written OCaml code.

However, using any camlp4 macros requires using the camlp4 replacement for the 
front-end of the compiler. That uses a different parsing technology (top-down 
recursive descent LL rather than bottom-up LALR) so the error messages from 
the compiler are completely different.

Dr Jon D Harrop, Flying Frog Consultancy Ltd.