← Back to context

Comment by sytelus

4 years ago

You are comparing apples to oranges. Fortran I developed in 1950s was 23K instructions. That was without fancy IDE and after spending 18 person years to develop. So, relatively, TP was obviously a very very tight code. Another comparison is GW Basic which was 80KB and so more than 2X in siz even though Basic is simpler language.

What bugs me is that even though vast majority of work is now outsourced to OS and external libraries and tremendous advances are made in compilation tech, our generated binary sizes are no where close to hand coded assembly. I mean not even close. For example, hello world manual assembly should take about 142 bytes. However, even assembler will spit out whooping 9KB binary for hello world in assembly language! Hello world in C will cost you a binary size of mind numbing 2000KB. https://drewdevault.com/2020/01/04/Slow.html

So put this perspective.

> Hello world in C will cost you a binary size of mind numbing 2000KB

2MB? I'm not sure where that number comes from. Maybe I misunderstand what you mean. I just tried compiling

    #include <stdio.h>
    main(){
      printf("Hello, world\n");
    }

with gcc on a Mac. The binary is 13340 bytes. Surprisingly big, but not 2000000 bytes! 1/150 that size.