# [luatex] Catcode table efficiency

Dirk Laurie dirk.laurie at gmail.com
Wed Jun 17 10:41:44 CEST 2015

2015-06-17 9:59 GMT+02:00 Joseph Wright <joseph.wright at morningstar2.co.uk>:

> In Heiko Oberdiek's luatex.dtx there is a note about catcode table
> allocation
>
>     % \item Large catcode table numbers should be avoided because of
>     %   performance breakdown.
>
> and this leads to that package implementing an allocation system whereby
> odd and even numbered tables are used for distinct purposes. Heiko's
> code is a few years old and I wonder if that comment still holds. It
> would be clearer to be able to split up tables by working from opposite
> ends of the available range, but that only makes sense if the top of the
> range is usable without a significant penalty.
>
> What's the current position?

If the question is purely related to Lua implementation, then there
has been no change. Specifically, Lua tables are extra efficient for
contiguous entries numbered from 1 upwards, and substantially
less so for high-numbered entries if there are many unused entries
in between.