[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: macros vs. blocks



Michael Sperber wrote:
> I'm on the side of using macros only where there's significant
> benefit.  I do agree there are a number of situations where there is
> significant benefit.

Well, me too.  I was trying to find well-documented examples of heavier-duty
macros, but your points about SSAX:make-parser are well-taken.

> All the performance gains in this case could be gained from a
> reasonable inlining compiler.

One point here is that as in C, for example, macro systems are often used to
affect performance in ways which can't be done via the compiler, often
simply because of language or compiler limitations.  In this sense, macros
are being used to compensate for these limitations, which is one of their
purposes, as I see it.

> I don't know if Oleg's done any
> measurements, but the original motivation for making SSAX:maker-parser
> came from making it run faster in the Gambit-C *interpreter*.

Funny, he didn't mention that in his presentation.  ;o)

Anton