unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: emacs-devel@gnu.org
Subject: Re: pcase-memoize: equal first branch, yet different
Date: Tue, 05 Mar 2013 04:59:45 -0500	[thread overview]
Message-ID: <8738warwtq.fsf@lifelogs.com> (raw)
In-Reply-To: jwvlia3as3p.fsf-monnier+emacs@gnu.org

On Mon, 04 Mar 2013 14:33:41 -0500 Stefan Monnier <monnier@iro.umontreal.ca> 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
significant.

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

Ted




  reply	other threads:[~2013-03-05  9:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-01 15:17 pcase-memoize: equal first branch, yet different Michael Heerdegen
2013-03-01 21:45 ` Michael Heerdegen
2013-03-04 19:33 ` Stefan Monnier
2013-03-05  9:59   ` Ted Zlatanov [this message]
2013-03-05 15:41     ` Stefan Monnier
2013-03-05 19:03       ` Ted Zlatanov
2013-03-05 14:13   ` Michael Heerdegen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8738warwtq.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).