You are welcome. And yes I can do that.
________________________________
From: Ihor Radchenko <yanta...@posteo.net>
Sent: Sun, 23 Feb 2025 14:40:00 +0000 (5 days, 22 hours, 54 minutes ago)
To: Dwarshuis, Nathan J
Subject: [PATCH] org-element.el; significant optimizations for 
org-element--interpret-affiliated-keywords
"Dwarshuis, Nathan J" <nd...@yavin4.ch> writes:

> patch updated and rebased on main

Thanks!
May you attach the patch as a separate attachment next time?
I was not able to apply this email patch automatically.

>> There is nothing stopping us from adding some affiliated keywords to
>> standard properties in future. What happens if you drop this
>> optimization? Does the benchmark still show an improvement?
>
> Adding back standard properties to the loop reduces performance by 5-20%
> depending on the element (see attached), but that's taking off of an already
> 5-10x speedup (see attached pdf).

Then, I'd rather not make assumptions about keywords being or not being
in standard properties. To avoid subtle bugs in the future.

An alternative approach to address searching affiliated keyword
properties could be storing the list of all the affiliated keyword
property names in a special property. Like what is done for :secondary.

> However, if we added affiliated keywords to standard properties we could
> easily access them without touching anything else since it would be an array
> lookup. I'm not sure why we would need to loop over the entire array.

The problem is the multitude of #+attr_XXX keywords.

Reply via email to