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: -- (:)
From: Oliver Bandel <oliver@f...>
Subject: Re: [Caml-list] Ask for a more efficient way to deallocate memory (full version)
Zitat von Jon Harrop <>:

> 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.

Yes, so far I know it.

> 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.

So, is it just a kind of pre-compilation?
The core-OCaml compiler will be the same?

Is the TryFinally-code slight enough, so that
it's behaving like handwritten OCaml? Did you look
at the TryFinally in detail?

> However, using any camlp4 macros requires using the camlp4
> replacement for the
> front-end of the compiler.

I have not looked at the OCaml-compiler in detail,
but from what you wrote I would assume, there
are at least two parts.

> 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.

Oh, well.... that's new to me.

I had not needed camlp4 so far. And I don't know if it makes sense to
look at it now, because there will be (or already is?) a replacement
(from 3.10 on?).

I hope the camlp4-tutorial will be updated to the camlp4-replacement.
Possibly later I might use it. Then it would be good to have
introductional material.