🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #20933

80486 vs. 68040 code size

#20933
From: Wm. E. Davidsen Jr
Date: Fri, 28 Apr 1989 20:36
59 lines
3023 bytes
  Someone posted an opinion that images on the 68040 will be smaller
than the 80386. I didn't think this sounded right, so I made a few
measurements. Note that this is not presented as a complete study, but
as a starting point which reflects my experience with 286/386 and
680[023]0.

  I checked the size of image files compiled from the same source on
Xenix/386 v2.3.1 and SunOS 3.4 (on a 3/280 if anyone cares). I noted
the size of the actual (stripped) file, and the values reported by
"size." I used available source to insure that differences in the
functions of SysV and BSD programs in bin would not skew the results.
All compiles with -O.

source		CPU	 file	text	data	  bss
zoo 2.01	386	 55368	43560	10312	 20904
		68k	 73728	57344	16384	 24136
compress 4.0	386	 20300	13236	 5964	442596
		68k	 32768	24576	 8192	419456
memacs 3.9n	386	 93080	75768	16280	 19592
		68k	114688	90112	24576	 18524

2nd order effects:

  Some people may claim that the Microsoft compiler is better than the
Sun compiler. The granularity of the library may be different. I am
assuming that the code for 486/68040 will be the same size (I don't
believe there are any new instructions in the 486, and I don't remember
any in the '40. Certainly not any which might drop the code size more
than a % or so.

What I think is happening:

  Although the 68k family has more registers than the 386, which should
decrease the number of load/store cycles, I believe that this is
outweighed by the many single byte opcodes in the 386. While the 286 was
limited in number of registers, the 386 is far better than the 286 because it
has more registers, and 32 bit registers. This prevents wasting two
registers on one 32 bit value.

  When the 386 runs out of registers, many instructions can be done to
memory, so the time goes up but not the number of instructions. Also
the 386 uses short addresses (1-2 bytes) which are extended at runtime.
This also helps cut the size of the code.

  I would welcome some data resulting from compilation using the gcc
compiler for both systems, assuming that someone has a working copy for
Xenix/386 (I'd like a copy, too). I hope to find time to measure the
bytes/instruction of the code, since I assume this is where the 386
wins.

  Since I am not making any claims of "better" let's not bring them
into the discussion, if any. Obviously I use machine of both type, so I
don't think I had any particular bias about code size.

-- 
	bill davidsen		(wedu@crd.GE.COM)
  {uunet | philabs}!steinmetz!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me
Technical Details
Message-ID: <13699@steinmetz.ge.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!batcomputer!rpi!crdgw1!steinmetz!davidsen

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!batcomputer!rpi!crdgw1!steinmetz!davidsen
From: davidsen@steinmetz.ge.com (Wm. E. Davidsen Jr)
Newsgroups: comp.arch
Subject: 80486 vs. 68040 code size
Message-ID: <13699@steinmetz.ge.com>
Date: 28 Apr 89 20:36:22 GMT
Reply-To: davidsen@crdos1.UUCP (bill davidsen)
Organization: GE Corp. R & D, Schenectady,NY
Lines: 59