5 ms·
it is less than 15kb in size written in assembly supports structs, unions, inline assembly, gotos, breaks, function pointers Thus it support more than otcc supp
by z29LiTp5qUC30n 7y ago
it is less than 15kb in size
written in assembly
supports structs, unions, inline assembly, gotos, breaks, function pointers
Thus it support more than otcc supported in a fraction of the size
- Dylan16807 7y agoThe file you linked is 200KB. OTCC is <4KB. It's admittedly using tiny names to squeeze under a size limit, but even when you correct for that it's a lot smaller. (Edit: At the time of submission the link went to https://github.com/oriansj/stage0/blob/master/Linux%20Bootstrap/x86/cc_x86.M1 https://github.com/oriansj/stage0/blob/master/Linux%20Bootst... with a description of "World's Smallest C Compiler")
- z29LiTp5qUC30n 7y agoYes that is the size of the source code with comments, the binary is less than 15KB
- Dylan16807 7y agoThat's significantly larger than the OTCC binary.
- z29LiTp5qUC30n 7y agoOTCC's binary is more than 22KB Thus OTCC is larger
- Dylan16807 7y ago...no it's not. The binary compiled by the elf version is 9KB.
- binarycrusader 7y agoIt's entirely possible you're both right -- different compilers and different environments will produce different results. So instead of arguing back and forth, it would be more helpful for others reading your comments if you provided full information about the conditions under which those sizes were achieved.
- Dylan16807 7y agoI'm talking about the official one linked on the page. The one that's self-compiled, so it shouldn't vary much if at all.