This assumes that you know precisely what the compiler is doing with your macros, and that compiler optimisations do not achieve better results than what you have hand-coded. [The Chief]
This may be true for executable code generated by the Pascal Macro
Compiler,
but it is not true for the data declarations that are generated for the
packed
strings. There is no executable code involved, so the compiler has
nothing
to optimize. [Rubin]
Yes -- if you only store the data and never access them.
Most people actually want to use the data they store. And the layout of the data can easily affect the code necessary to access it, both in speed and size. [Hockenbach]
The Pascal Macro Compiler could certainly generate code for accessing the strings, however the Keyword String macros do not generate access code; they generate data structures.
These structures are well-suited for access by hash functions, hash trees, binary trees, heap search, or binary search. The normal code and tables for these methods will work with minimal, or no, complications. In the last two cases, no extra storage or structures are needed.
Frank Rubin