]> Lady’s Gitweb - Shushe/commit
Just manually parse hexadecimal in Awk 0.5.2
authorLady <redacted>
Sat, 3 Feb 2024 23:25:56 +0000 (18:25 -0500)
committerLady <redacted>
Sun, 4 Feb 2024 00:49:30 +0000 (19:49 -0500)
commitcd1e51dfa7c2883a9dccaee37dda45ce17223186
treea67a8aa8ab1bec6d716024c442ad41b12fd3fec8
parenteb3b42b3ee2ac34f01624d360b2ae3195151cfd4
Just manually parse hexadecimal in Awk

The biggest performance bottleneck in this code was the fact that, for
compatibility reasons, Awk was piping hexadecimal numbers to the shell
in order to parse them. (Macintosh Awk can parse hexadecimal numbers in
`printf`, but G·N·U Awk cannot.)

Because the hexadecimal number is known to be two digits, it’s easy to
just parse it in Awk directly, avoiding the shell pipe and considerably
speeding up the program.
GNUmakefile
This page took 0.029228 seconds and 5 git commands to generate.