Rasmus <ras...@gmx.us> writes:

> I'm curious about the hash table.  (info "(elisp) Hash Tables") says "For
> smaller tables (a few tens of elements) alists may still be faster [than
> hash tables]".

True, but then, both a small table and a small alist are very fast.
OTOH, hash tables scale better.

> For an Org document, might it not make more sense to use an alist for
> this?

It doesn't matter much. I'd still favor a hash-table since it's hard to
predict an upper bound for include keywords in a document, but it's your
call, really. 

I doubt the alist or hash table will be the bottleneck.

> Or will the speed be regained when doing many includes from the
> same document (since I'd check if a footnote is already in the table)?

You would need to access the alist/hash table for each include keyword,
not necessarily from the same document.

> Also, since INCLUDE is expanded before info, should I just create a new
> defvar holding the table during export?  I guess that's the only way to
> hold it in memory across several INCLUDE words.

It should be in the scope of `org-export-expand-include-keyword', much
like `file-prefix'. No need for a global variable.

Regards,

Reply via email to