Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How would this compare to a non-.Net binary?


I just generated C99 with my Oberon+ example (see https://news.ycombinator.com/item?id=36652878) and compiled it with -O2. The generated Hello.c is 382 bytes, the Hello.h is 240 bytes, and the compiled Hello.o is 1264 bytes (compared to the 2048 bytes of the Hello.dll assembly). If I build a shared library which includes the runtime and some boiler-plate stuff the stripped version is 17760 bytes; if I instead build an executable, the stripped size is 17952 bytes (compared to the ~10 MB including mono and mscorlib.dll to run the assembly).


I think the limitation here is mostly the PE format, not the .Net framework.


You can make super small hello world binaries if you try.

https://nathanotterness.com/2021/10/tiny_elf_modernized.html

has a 120 byte hello world program for x86_64 ELF.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: