LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Joseph Wright <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Tue, 24 Nov 2009 14:46:01 +0000
text/plain (27 lines)
J.Fine wrote:
> The overhead you point to is slight, and there are worse offenders (such as the LaTeX3 programming language itself).
> I also suspect that if you do the tests I think you'll find
>   \expandafter\def\csname\endcsname{A longish piece of text}
>   \def\mymacro #1{\csname\endcsname
>   \mymacro{aa}
> will be quicker than
>   \mymacro{A longish piece of text}
> because of the reduced churning of tokens.  But I could be wrong.

I think that it's likely that dictionaries will be implemented using
data "packed" inside another variable, rather than as csnames. This
makes it easier to do things like "clear the dictionary" without needing
to know every entry type.

> Your revision of my
>     #1{name}
> to
>     \DictionaryLookup{#2}{name}
> I strongly disagree with.  You've taken something simple that works, and changed it to something that is broken (because it assumes that all maps will be dictionaries).

That will depend on how things are implemented, but I take your point.
Sorry about this.
Joseph Wright