[Top][All Lists]

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

Re: pcase-memoize: equal first branch, yet different

From: Ted Zlatanov
Subject: Re: pcase-memoize: equal first branch, yet different
Date: Tue, 05 Mar 2013 04:59:45 -0500
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

On Mon, 04 Mar 2013 14:33:41 -0500 Stefan Monnier <address@hidden> wrote: 

SM> The pcase macro's expansion can take a significant amount of time to
SM> generate.  When done during byte-compilation, it's a non-issue, but in
SM> the above example it will be done every time you click.

SM> For this reason, pcase uses a memoization mechanism, to try and reuse
SM> previous expansions.  Sadly, this is unreliable because it is difficult
SM> to figure out when two chunks of code are actually identical and to do
SM> so without incurring undue overheads.

Would it make sense to implement some parts of `pcase' at the C level?
As it becomes widely used, byte-compilation delays can also become

(For the record, I like `pcase' a lot, and really appreciate the
simplicity pattern matching brings to code.)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]