On Mon, Apr 13, 2009 at 2:13 PM, David Nolen <
dnolen...@gmail.com> wrote:
> One caveat is that because this works by transforming the code into
> Continuation Passing Style, it's dog slow, like 2 orders of magnitude for
> regular Clojure code. This is not really much of an issue for user interface
> related code (which is what I'm using it for), but unrealistic for pretty
> much anything else.
> However, with some quick testing I note that using Exceptions for flow
> control might be even 2x slower than clj-cont.
Although I have never verified this myself, reputedly it is
constructing exceptions what is slow, not throwing or catching them.
In other words, for the amb implementation above, it might be worth
defining a "constant" exception and throwing that. (Although I'm
confused, I see in the code (.Exception "something"), shouldn't that
be (Exception. "something") instead?)
Cheers,
Victor Rodrigeuz.