Browse thread
Ask for a more efficient way to deallocate memory (full version)
[
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: | -- (:) |
| 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:59, Jon Harrop wrote: > 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. Incidentally, the single biggest disadvantage of adding syntactic constructs like this using macros is that your code will no longer autoindent properly. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/products/?e