This one never gets old! While it's debatable whether it makes a whole lot of sense to compare compiled code to (completely) unrelated things, it's pretty shocking that touch on Mac OS Lion is that large in size (haven't verified myself though). Perhaps someone could quickly explain how that particular version of touch operates.
touch in macOS Sierra is down to 23kB since the 32-bit version is no longer part of the binary.
If you open it up, it's about 2/3rds zeros, maybe 10% Apple signing certificate, a whole bunch of dynamic linking data and according to otool, the (__TEXT,__text) section – normal code – is a mere 3kb in size.
Thanks for taking your time to analyze the binary. I know we are not constrained by expensive hard drives these days, but this sure is some wasted space.
I think this is a little misleading since I don't think version 3 really was a "solid representation of the Turbo Pascal experience". Version 3 was pretty feature poor: no step through debugger, no pull-down menus in the IDE, etc. It's was just a bare-bones console editor and a COM-only compiler.
It was the blue-background versions of the IDE that most people remember as "Turbo Pascal". That started with version 5. These versions were more than 10 times the size of Turbo Pascal 3. 548.64 kB for version 5 and nearly double that again for version 5.5.
500kB is still pretty small by modern standards but don't be thinking that everything you might associate with "Turbo Pascal" fit into 39,731 bytes.
Pascal as a language was designed, among other things, to be very easy to compile. I believe that most of the time you don't even need to build an AST, for instance. Unless you try to optimize the result seriously, it must be reasonably easy to write a very compact and resource-economical Pascal compiler.
15 comments
[ 0.25 ms ] story [ 18.3 ms ] threadIf you open it up, it's about 2/3rds zeros, maybe 10% Apple signing certificate, a whole bunch of dynamic linking data and according to otool, the (__TEXT,__text) section – normal code – is a mere 3kb in size.
NB: UPX compresses it from 23312 -> 12904 bytes (55.35%) using UCL.
It was the blue-background versions of the IDE that most people remember as "Turbo Pascal". That started with version 5. These versions were more than 10 times the size of Turbo Pascal 3. 548.64 kB for version 5 and nearly double that again for version 5.5.
500kB is still pretty small by modern standards but don't be thinking that everything you might associate with "Turbo Pascal" fit into 39,731 bytes.
They are comparing to meaningless stuff like an iPhone picture (!)