[Top][All Lists]

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

Re: pure-fns in byte-opt.el

From: Stefan Monnier
Subject: Re: pure-fns in byte-opt.el
Date: Wed, 26 Jul 2017 22:46:23 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

> (let ((pure-fns
> -       '(concat symbol-name regexp-opt regexp-quote string-to-syntax)))
> +       '(concat symbol-name regexp-opt regexp-quote string-to-syntax
> +         make-vector)))

Ah, now that makes a lot more sense: make-vector is much less pure than
string-to-char.  The above will cause the compiler to replace

   (make-vector 2 ?a)


   [?a ?a]

so you end with a single immediate vector being re-used over and over,
instead of having a new vector created each time.


reply via email to

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