## LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

#### View:

 Message: [ First | Previous | Next | Last ] By Topic: [ First | Previous | Next | Last ] By Author: [ First | Previous | Next | Last ] Font: Proportional Font

Subject:

Re: Passing a dictionary to, for example, the TOC entry formatter

From:

Date:

Tue, 24 Nov 2009 14:46:01 +0000

Content-Type:

text/plain

Parts/Attachments:

 text/plain (26 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 aa.bb\endcsname{A longish piece of text} > \def\mymacro #1{\csname #1.bb\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