code density (Announce)
> > [...] code density. [...]
>
> Output or input code density?
Output. Wirth claims it easily was much much smaller than x86 in output code size. (Of course nowadays even he cares less since "RAM is so cheap" ... argh, I'm tired of hearing that.)
> > You know, a megabyte truly is
> > a lot of space. Even at worst, six bytes per instruction (8086),
> > 1024*1024/6 = 174762, or 640*1024/6 = 109226 or more realistically
> > 512*1024/6 = 87381.
>
> IBM's decision to reserve 384 KiB for BIOS and text/graphics buffer mapping
> be damned!
Tim Paterson's original machine(s) didn't have that limit. And rumor says IBM wanted to make it 512 kb, but MS complained. Blame bad compilers for hitting that wall so soon.
> > It's truly sloppy or crappy compilers that don't output small size
> anymore.
>
> I heard they're optimizing for speed now.
Then why is GCC so slow?? GCC is a pain to use, rebuild, etc. No way can anybody understand it all anymore, only various subsets, if even! I like GCC, but not that much! It could always be improved, slimmed down, etc.
Wirth (re)wrote a single-pass Modula-2 compiler (proper? not counting M-code interpreter?) in 5000 lines in 1984 or 1985 or so. Since it didn't need a billion separate passes due to memory limits, it was much faster and could compile itself in 45 secs. And yet even with modern machines rebuilding GCC takes ages (esp. on non-*nix, e.g. Cygwin)!! Sure assembly is mostly simple syntax and almost typeless, but I'm extremely glad it doesn't take years to build something. (Try rebuilding Menuet32 or OctaOS sometime. Even FreeDOS doesn't take nearly as long as rebuilding "modern" GCC. Old, simpler 2.7.2.3 is fast, though, primarily because things had to be fast back then. Nowadays you just throw more RAM, cores, 64-bit at it and hope it works.) Yup, we've jumped the shark.
Autoconf alone easily surpasses Wirth's compiler linecount!! Why do we need ten billion files, ten thousand defines, and a billion hacks?? Because everybody keeps adding everything and the kitchen sink: K&R, ANSI, C99, POSIX, 32-bit, 64-bit, extensions, portability, SIMD, AT&T or Intel, preprocessor, various backends, 586 and 686 and 786 optimizations, etc. etc. The source for the ACK compiler suite (pc, m2, cc) is less than 1 MB bzip2'd! Yet GM2 is like 56 MB gzip'd! Yeah, you could delete a lot of that, but similar gcc-core 4.1.2 (C only) is like 22 MB gzip'd, ugh. And gcc-core 2.95.3 was 9 MB gzip'd, if that tells you anything.
The whole Lilith machine was written in Modula-2, avoiding the need for ten million different languages and their associated tools, so it was much less complex. Of course, it was developed by a small group, not a big hodgepodge of everybody wanting to add their own stuff. Whether you like assembly or not, the advantage is that it's static, already defined, relatively simple, so you have your instructions and you make do (unlike certain HLLs which add more and more reserved words). However, obviously I dislike the idea that AVX, XOP, etc. are taking over, esp. since we're barely on the SSE4 bandwagon yet (blah), MMX and FPU are semi-obsolete, etc. (ARGH!) If all you want to do is reasonable computations, shouldn't 8086 (+ 8087) or 80386 be enough???
> > Or maybe it's the dumb linkers fault for not stripping the unused parts.
>
> Yes, you should strip unused parts. Think about TSRs. DOS functions
> Int21.31 or Int27, as utilized by most TSRs. These are stupid because a
> majority of TSRs don't need a PSP while installed. Most people don't care
> to relocate their TSR code in a way to free up all installation code
> either. Bonus spite if they don't even free their environment. (Besides,
> memory fragmentation.)
The simple truth is that "good enough" is the enemy of "better". If it's 80% good enough or covers 80% of the target audience, it's good to go. But then later someone else makes similar compromises, and now you've got 80% of 80%, and ever decreasing amount. Eventually you have one big abomination that does what nobody wants, and nobody can use it properly. Maybe this is why design by committee is so frowned upon. It's always easier to add than take away or simplify / unify everything.
Yeah, Clang / LLVM are considered "more modern" than GCC, and they are doing well, so it's not like nobody cares. (Written in C++ too. Good?? Bad??) And obviously other compilers exist. Still, the inertia of (despite everything) still making everything in C / GCC is daunting! :-/
Complete thread:
- NASM version 2.09 available - rr, 25.08.2010, 13:27 (Announce)
- NASM version 2.09 available - DOS386, 26.08.2010, 09:10
- NASM version 2.09 available - ecm, 26.08.2010, 20:10
- NASM version 2.09 available - DOS386, 27.08.2010, 03:16
- NASM version 2.09 available - marcov, 27.08.2010, 17:10
- NASM version 2.09 available - Rugxulo, 28.08.2010, 04:53
- NASM version 2.09 available - ecm, 30.08.2010, 21:40
- NASM version 2.09 available - Rugxulo, 03.09.2010, 05:51
- NASM version 2.09 available - Arjay, 03.09.2010, 13:14
- NASM version 2.09 available - ecm, 03.09.2010, 14:40
- NASM version 2.09 available | 8086 is COOOOL - DOS386, 06.09.2010, 20:06
- NASM version 2.09 available | 8086 is COOOOL - Rugxulo, 06.09.2010, 22:27
- NASM version 2.09 available | 8086 is COOOOL - DOS386, 06.09.2010, 22:37
- NASM version 2.09 available | 8086 is COOOOL - Arjay, 07.09.2010, 18:19
- NASM version 2.09 available | 8086 is COOOOL - ecm, 07.09.2010, 18:53
- NASM version 2.09 available | 8086 is COOOOL - Arjay, 07.09.2010, 18:19
- NASM version 2.09 available | 8086 is COOOOL - Arjay, 07.09.2010, 07:33
- NASM version 2.09 available | 8086 is COOOOL - ecm, 07.09.2010, 16:22
- NASM version 2.09 available | 8086 is COOOOL - Rugxulo, 07.09.2010, 16:59
- NASM version 2.09 available | 8086 is COOOOL - Arjay, 07.09.2010, 18:04
- NASM version 2.09 available | A86 - ecm, 07.09.2010, 19:15
- NASM version 2.09 available | A86 - Arjay, 07.09.2010, 19:58
- NASM version 2.09 available | A86 - ecm, 07.09.2010, 22:42
- NASM 2.09 available | A86 | FASM | Arjay's 8086+80386 PC's - DOS386, 08.09.2010, 01:05
- FASM and OMF - Japheth, 08.09.2010, 09:26
- 16-bit DOS COBOL, 16-bit DOS PASCAL, 16-bit DOS C, 16-bit - DOS386, 08.09.2010, 19:40
- 16-bit DOS COBOL, 16-bit DOS PASCAL, 16-bit DOS C, 16-bit - ecm, 08.09.2010, 19:45
- 16-bit DOS COBOL, 16-bit DOS PASCAL, 16-bit DOS C, 16-bit - DOS386, 08.09.2010, 19:53
- FASM is copylefted - ecm, 08.09.2010, 20:02
- 16-bit DOS COBOL, 16-bit DOS PASCAL, 16-bit DOS C, 16-bit - DOS386, 08.09.2010, 19:53
- 16-bit DOS COBOL, 16-bit DOS PASCAL, 16-bit DOS C, 16-bit - ecm, 08.09.2010, 19:45
- 16-bit DOS COBOL, 16-bit DOS PASCAL, 16-bit DOS C, 16-bit - DOS386, 08.09.2010, 19:40
- NASM - FASM - ecm, 08.09.2010, 15:09
- NASM 2.09 available | A86 | FASM | Arjay's 8086+80386 PC's - Arjay, 08.09.2010, 22:12
- NASM 2.09 available | A86 | FASM | Arjay's 8086+80386 PC's - DOS386, 11.09.2010, 01:23
- NASM - FASM license - ecm, 11.09.2010, 01:53
- NASM 2.09 available | A86 | FASM | Arjay's 8086+80386 PC's - Arjay, 13.09.2010, 13:31
- NASM 2.09 available | A86 | FASM | Arjay's 8086+80386 PC's - DOS386, 11.09.2010, 01:23
- FASM and OMF - Japheth, 08.09.2010, 09:26
- NASM 2.09 available | A86 | FASM | Arjay's 8086+80386 PC's - DOS386, 08.09.2010, 01:05
- NASM version 2.09 available | A86 - ecm, 07.09.2010, 22:42
- NASM version 2.09 available | A86 - Rugxulo, 08.09.2010, 06:56
- NASM version 2.09 available | A86 - Arjay, 07.09.2010, 19:58
- NASM version 2.09 available | 8086 is COOOOL - Rugxulo, 08.09.2010, 06:28
- NASM version 2.09 available | A86 - ecm, 07.09.2010, 19:15
- NASM version 2.09 available | A86 and kernels - ecm, 07.09.2010, 18:42
- NASM version 2.09 available | A86 and kernels - Rugxulo, 08.09.2010, 06:49
- NASM version 2.09 available | A86 and kernels - ecm, 08.09.2010, 20:30
- NASM version 2.09 available | A86 and kernels - ecm, 11.09.2010, 12:27
- Debian/OW ... FASM - Rugxulo, 11.09.2010, 23:44
- Debian/OW ... FASM - ecm, 12.09.2010, 02:40
- Debian/OW ... FASM - Rugxulo, 12.09.2010, 04:18
- Debian/OW ... FASM - ecm, 12.09.2010, 14:29
- FASM's license - Rugxulo, 12.09.2010, 22:18
- FASM's license - ecm, 12.09.2010, 23:12
- FASM's license - Rugxulo, 13.09.2010, 01:49
- FASM's license - ecm, 13.09.2010, 14:13
- FASM's license - Rugxulo, 13.09.2010, 22:27
- FASM's license - ecm, 14.09.2010, 15:50
- FASM's license - Rugxulo, 15.09.2010, 23:29
- FASM's license - ecm, 16.09.2010, 00:03
- code density - Rugxulo, 16.09.2010, 21:10
- code density - ecm, 17.09.2010, 14:15
- code density - Rugxulo, 17.09.2010, 23:06
- code density - ecm, 18.09.2010, 02:18
- code density - Rugxulo, 19.09.2010, 20:23
- code density - ecm, 19.09.2010, 20:27
- this messy thread - DOS386, 13.10.2010, 04:17
- this messy thread - Rugxulo, 13.10.2010, 04:50
- this messy thread - ecm, 14.10.2010, 13:01
- this messy thread - Rugxulo, 13.10.2010, 04:50
- this messy thread - DOS386, 13.10.2010, 04:17
- code density - ecm, 19.09.2010, 20:27
- code density - Rugxulo, 19.09.2010, 20:23
- code density - ecm, 18.09.2010, 02:18
- code density - Rugxulo, 17.09.2010, 23:06
- code density - ecm, 17.09.2010, 14:15
- code density - Rugxulo, 16.09.2010, 21:10
- FASM's license - ecm, 16.09.2010, 00:03
- FASM's license - Rugxulo, 15.09.2010, 23:29
- FASM's license - ecm, 14.09.2010, 15:50
- FASM's license - Rugxulo, 13.09.2010, 22:27
- FASM's license - ecm, 13.09.2010, 14:13
- FASM's license - Rugxulo, 13.09.2010, 01:49
- FASM's license - ecm, 12.09.2010, 23:12
- FASM's license - Rugxulo, 12.09.2010, 22:18
- Debian/OW ... FASM - ecm, 12.09.2010, 14:29
- Debian/OW ... FASM - Rugxulo, 12.09.2010, 04:18
- Debian/OW ... FASM - ecm, 12.09.2010, 02:40
- Debian/OW ... FASM - Rugxulo, 11.09.2010, 23:44
- NASM version 2.09 available | A86 and kernels - Rugxulo, 08.09.2010, 06:49
- NASM version 2.09 available | 8086 is COOOOL - tom, 07.09.2010, 19:58
- NASM version 2.09 available | 8086 is COOOOL - Rugxulo, 08.09.2010, 06:58
- NASM version 2.09 available | 8086 is COOOOL - Arjay, 07.09.2010, 18:04
- 8086 is fairly useless - tom, 07.09.2010, 19:47
- 8086 is fairly useless - ecm, 07.09.2010, 19:55
- NASM version 2.09 available | 8086 is COOOOL - Rugxulo, 07.09.2010, 16:59
- NASM version 2.09 available | 8086 is COOOOL - DOS386, 06.09.2010, 22:37
- NASM version 2.09 available | 8086 is COOOOL - Arjay, 07.09.2010, 07:26
- NASM version 2.09 available | NASM manual - ecm, 07.09.2010, 16:30
- NASM version 2.09 available | 8086 is COOOOL - Rugxulo, 06.09.2010, 22:27
- NASM version 2.09 available - Rugxulo, 13.10.2010, 06:15
- NASM version 2.09 available | 8086 is COOOOL - DOS386, 06.09.2010, 20:06
- NASM version 2.09 available - Rugxulo, 03.09.2010, 05:51
- NASM version 2.09 available - ecm, 30.08.2010, 21:40
- NASM version 2.09 available - Rugxulo, 28.08.2010, 04:53
- 8086-NASM - Japheth, 14.09.2010, 15:04
- 8086-JWASM - ecm, 14.09.2010, 15:33
- NASM version 2.09 available - ecm, 26.08.2010, 20:10
- NASM version 2.09 available - DOS386, 26.08.2010, 09:10