]> git.draconx.ca Git - cdecl99.git/commit
libcdecl: Further optimize symbol name lookup.
authorNick Bowler <nbowler@draconx.ca>
Wed, 21 Feb 2024 03:36:08 +0000 (22:36 -0500)
committerNick Bowler <nbowler@draconx.ca>
Wed, 21 Feb 2024 03:54:30 +0000 (22:54 -0500)
commit847964f010e5f56bcd13a6dde2d0a73e7cc67273
tree6e9f88059b8a21f305751af4c54968e90332068e
parent5ae3ba932439eba36f6e224367f93c97653ca3c0
libcdecl: Further optimize symbol name lookup.

We can combine the mapping and string tables into a single static
allocation, which allows everything to be offset from a single
base address which is slightly more efficient.

Since we are not fitting these offsets in 8 bits, and are nowhere
near exceeding 16 bits, just use uint_least16_t for the mapping table
unconditionally instead of trying to come up with a new preprocessor
conditional string that works with the new calculation.
src/fix-yytname.awk