Morgan Smith <morgan.j.sm...@outlook.com> writes:

> This should result in a nice performance boost when the function is
> called repeatedly (as is often done).
>
> * lisp/org.el (org-make-tags-matcher): Evaluate returned function to
> compile it into a closure.
> ...
> I don't have any rigorous benchmarks but this does make things significantly
> faster.  This actually seems to have a bigger performance impact on
> `org-clock-sum' then my rewrite of `org-clock-sum' I submitted earlier does.
> Which is a little frustrating honestly.
>
> It does involve using the `eval' function which I know is a little taboo.
> Although in this case I don't believe it actually adds any danger.

I am able to reproduce a noticeable ~10% speedup.
Even better approach is byte-compiling the result. It yields ~20%
speedup.

I applied an alternative patch that byte-compiles the returned function.

Handled, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3e11b2eb8

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to