Proxy Information
Original URL
gemini://gemini.kaction.cc/log/2022-08-06.1.gmi
Status Code
Success (20)
Meta
text/gemini # Thoughts on separate compilation (part 2) Continuing musing on how to recover C language optimization lost to separate compilation. => ./2022-07-14.1.gmi As proof of concept, I made tool that takes C source and appends unique hash to every static definition and adjusts references accordingly. After that we can concatenate individual files, eliminate duplicate declarations/definitions and finally feed it to the compiler. Here is the link to the tool source: => https://git.sr.ht/~kaction/cstatic It actually worked! For GNU Ed=1.4, compiled with gcc=9.3.0 on Alpine=3.11 with "-Os -s" flags, trickery with "cstatic" saved 4Kb, from 47144 bytes to 43080. Next step was to inline whole standard library, so I decided to do the same with musl C library. That didn't work out of the box, for many reasons, but most importantly, musl has multiple distinct definitions of "struct cookie". I didn't found anything short of forking to solve this problem. Anyway, here is the current state of my research on how to save couple kilobytes in the world that eagerly wastes megabytes to read 140 byte text message.
Capsule Response Time
393.7794 milliseconds
Gemini-to-HTML Time
0.004228 milliseconds

This content has been proxied by September (3851b).