Poster | Thread |
cdimauro
|  |
The (Microprocessors) Code Density Hangout Posted on 1-May-2021 5:39:00
| | [ #1 ] |
|
|
 |
Elite Member  |
Joined: 29-Oct-2012 Posts: 4173
From: Germany | | |
|
| Since we talk about code density from time to time, I'd like to open a thread in this section to collect all information, instead of having it spread around in several threads (which also disappear and are difficult to retrieve).
@matthey: I think that you're the most competent and active expert about this topic. Would you like to contribute?
My idea is to create some comments at the beginning of the thread which covers/collect specific topics, which will get updated from time to time. Example: - General information (what's code density, why it's important, etc.) - Benchmarks (state of the art) - Compilers (which ones are best) - Literature (book, academic papers, web sites) - Microprocessors (general information like if the ISA is more or less oriented to code density, if it has specific execution modes for compact code, if it has specific extensions for compact code, etc.) - Motorola 68K corner (anything which is useful about this family, which is not covered by other topics) - Intel IA-32/x86 / AMD x86-64/x64 corner (...) - ARM corner (...) - RISC-V corner (...) - SuperH / J2 corner (...) - Embedded corner (...) - another 5 empty comments for topics which may pop-up in future.
@matthey can you take care of creating and updating those comments? As I said, you're the most competent and also active, so I think that you can contribute much better than me.
A request from my side: please can you share your updated 68K source about this http://deater.net/weave/vmwprod/asm/ll/ll.html ? Looking at your tables in Google Documents the numbers don't match with what mr. Weaver published in that link. |
|
Status: Offline |
|
|
noXLar
 |  |
Re: The (Microprocessors) Code Density Hangout Posted on 1-May-2021 20:32:39
| | [ #2 ] |
|
|
 |
Cult Member  |
Joined: 8-May-2003 Posts: 737
From: Norway | | |
|
| @cdimauro
wow, are you back:)
nice to see you bro! hope you will supply site with lots of interesting things:)
_________________ nox's in the house! |
|
Status: Offline |
|
|
matthey
|  |
Re: The (Microprocessors) Code Density Hangout Posted on 2-May-2021 0:06:06
| | [ #3 ] |
|
|
 |
Elite Member  |
Joined: 14-Mar-2007 Posts: 2539
From: Kansas | | |
|
| cdimauro Quote:
Since we talk about code density from time to time, I'd like to open a thread in this section to collect all information, instead of having it spread around in several threads (which also disappear and are difficult to retrieve).
@matthey: I think that you're the most competent and active expert about this topic. Would you like to contribute?
...
@matthey can you take care of creating and updating those comments? As I said, you're the most competent and also active, so I think that you can contribute much better than me.
|
The topic is a nice idea but I get the feeling that most people here really don't want to know about code density so I'm not very motivated. I really should stop wasting my time here but the interesting court case lured me in.
cdimauro Quote:
A request from my side: please can you share your updated 68K source about this http://deater.net/weave/vmwprod/asm/ll/ll.html ? Looking at your tables in Google Documents the numbers don't match with what mr. Weaver published in that link. |
The last update I sent Dr. Weaver was mostly an improvement of the decompression code by ross on EAB. The assembler files are available on the last 2 pages of the following thread.
http://eab.abime.net/showthread.php?s=e81df9c472e296778e1c2996bf076333&t=85855&page=8
Notice that ross complains in the last post about the statistics not being updated.
ross Quote:
|
|
Status: Offline |
|
|
cdimauro
|  |
General information Posted on 2-May-2021 5:34:39
| | [ #4 ] |
|
|
 |
Elite Member  |
Joined: 29-Oct-2012 Posts: 4173
From: Germany | | |
|
| |
Status: Offline |
|
|
cdimauro
|  |
Benchmarks Posted on 2-May-2021 5:35:05
| | [ #5 ] |
|
|
 |
Elite Member  |
Joined: 29-Oct-2012 Posts: 4173
From: Germany | | |
|
| Some benchmarks from the The Totally Unscientific Code Density Competition! (compiling the OSD control module from one of the many Minimig variants):
OpenRISC – 81376 MIPS (f32c) – 71356 RISC-V – 69936 ZPU – 68868 ARM – 67952 X86-64 – 66112 m68k (68000) – 65760 i386 – 64080 832 – 63599 RISC-V compressed – 57780 MIPS16 – 54192 ARM Thumb – 51436
Some benchmarks from the Code Density Compared Between Way Too Many Instruction Sets (doing a buildroot run. NOTE: of what? The Gemini portal? NOT clear):
Microblaze LE - 1,223,148 bytes - No target specific settings available Xtensa - 1,216,228 bytes - fsf target OpenRISC - 1,133,164 bytes - No target specific settings available MIPS32 LE - 1,017,196 bytes - P5600 target, no softfloat SPARC64 - 997,624 bytes - SPARCv9 MIPS64 LE - 989,024 bytes - P6600 target, no softfloat, n32 ABI PPC64LE - 985,552 bytes - Power8 target PPC32 - 984,396 bytes - 476FP target RV64G - 934,368 bytes - RV64G platform defaults SPARC32 - 931,064 bytes - SPARCv8 S390X - 907,712 bytes - z15 target Nios II - 892,316 bytes - No target specific settings available NDS32 - 888,124 bytes - No target specific settings available SH-4A LE - 842,884 bytes - No target specific settings ARM64 LE - 779,936 bytes - Cortex-A76 target, FP-ARMv8 x86_64 - 747,224 bytes - Haswell target RV64GC - 741,856 bytes - ilp64d ABI RV32GC - 719,916 bytes - ilp32d ABI x86 - 713,916 bytes - i686 target m68k - 698,776 bytes - M68040 target ARM Thumb1 LE - 632,004 bytes - Thumb, softfloat, ARM926T target ARC LE - 623,912 bytes - 8K pages, HS38 Quad MAC + FPU target ARM Thumb2 LE - 599,248 bytes - Thumb2, VFPv4-D16, Cortex-A7 target
Some benchmarks from the SPARC16: A new compression approach for the SPARC architecture:

Some benchmarks from High-Performance Extendable Instruction Set Computing (benchmark tests unknown):

Some benchmarks from Comparative Architectures, CST Part II, 16 lectures, Lent Term 2005 (Ian Pratt) (Old versions of GCC, GCC-C++, PGP):
view image download
Some benchmarks from Enhancing the RISC-V Instruction Set Architecture (SPEC2006 and CSiBE test suits used with GCC): SPEC2006
how to modify pictures online for free
SPEC2006 - Compressed vs Base ISA

CSiBE

Average instruction length

Normalised instruction counts
 Last edited by cdimauro on 03-Oct-2022 at 04:57 PM. Last edited by cdimauro on 02-Oct-2022 at 07:43 PM. Last edited by cdimauro on 02-Oct-2022 at 07:24 PM. Last edited by cdimauro on 19-Sep-2022 at 08:47 PM. Last edited by cdimauro on 18-Sep-2022 at 05:01 AM.
|
|
Status: Offline |
|
|
cdimauro
|  |
Compilers Posted on 2-May-2021 5:35:23
| | [ #6 ] |
|
|
 |
Elite Member  |
Joined: 29-Oct-2012 Posts: 4173
From: Germany | | |
|
| |
Status: Offline |
|
|
cdimauro
|  |
Literature Posted on 2-May-2021 5:35:37
| | [ #7 ] |
|
|
 |
Elite Member  |
Joined: 29-Oct-2012 Posts: 4173
From: Germany | | |
|
| |
Status: Offline |
|
|
cdimauro
|  |
Microprocessors Posted on 2-May-2021 5:35:52
| | [ #8 ] |
|
|
 |
Elite Member  |
Joined: 29-Oct-2012 Posts: 4173
From: Germany | | |
|
| |
Status: Offline |
|
|
cdimauro
|  |
Motorola 68K Posted on 2-May-2021 5:36:22
| | [ #9 ] |
|
|
 |
Elite Member  |
Joined: 29-Oct-2012 Posts: 4173
From: Germany | | |
|
| Some instructions statistics from Kickstart 1.2:
1 word opcodes: 1965 (51.0) 2 word opcodes: 1436 (37.2) 3 word opcodes: 267 (6.9) 4 word opcodes: 92 (2.4) 5 word opcodes: 34 (0.9) 6 word opcodes: 7 (0.2) 7 word opcodes: 17 (0.4) 8 word opcodes: 18 (0.5) 9 word opcodes: 3 (0.1)
And from some applications (only showing instructions with 1% or more of total):
Program 'dis' (my disassember, asm) total insts = 23861 1 word insts = 11050, 46% 2 word insts = 10940, 45% 3 word insts = 1834, 7%
Program 'CMP' (asm) total insts = 1984 1 word insts = 752, 37% 2 word insts = 943, 47% 3 word insts = 217, 10% 4 word insts = 72, 3%
Program 'MBRTest-2' (asm?) total insts = 25401 1 word insts = 16664, 65% 2 word insts = 7619, 29% 3 word insts = 965, 3%
Program 'Hex' total insts = 8730 1 word insts = 2935, 33% 2 word insts = 5120, 58% 3 word insts = 646, 7%
Program 'Redit' total insts = 23984 1 word insts = 8890, 37% 2 word insts = 12025, 50% 3 word insts = 2880, 12%
Program 'cb' (Sierra game "Colonel's bequest") total insts = 1093 1 word insts = 454, 41% 2 word insts = 561, 51% 3 word insts = 65, 5% 4 word insts = 13, 1%
Program 'AIBB' total insts = 49748 1 word insts = 22517, 45% 2 word insts = 20943, 42% 3 word insts = 5574, 11%
Program 'moned' total insts = 5136 1 word insts = 2894, 56% 2 word insts = 2023, 39% 3 word insts = 208, 4%
Program 'AmiModRadio' total insts = 43042 1 word insts = 24239, 56% 2 word insts = 11125, 25% 3 word insts = 7587, 17%
Program 'wolf3d' total insts = 40359 1 word insts = 20901, 51% 2 word insts = 11938, 29% 3 word insts = 5932, 14% 4 word insts = 1398, 3%
Program 'IBrowse' (sasc) total insts = 222475 1 word insts = 115443, 51% 2 word insts = 88699, 39% 3 word insts = 15854, 7% 4 word insts = 2397, 1%
Program 'python2.4' (gcc?) total insts = 175669 1 word insts = 98758, 56% 2 word insts = 55819, 31% 3 word insts = 19977, 11% Last edited by cdimauro on 10-Sep-2022 at 07:22 AM.
|
|
Status: Offline |
|
|
cdimauro
|  |
Intel IA-32/x86 / AMD x86-64/x64 Posted on 2-May-2021 5:36:36
| | [ #10 ] |
|
|
 |
Elite Member  |
Joined: 29-Oct-2012 Posts: 4173
From: Germany | | |
|
| |
Status: Offline |
|
|
cdimauro
|  |
ARM Posted on 2-May-2021 5:36:51
| | [ #11 ] |
|
|
 |
Elite Member  |
Joined: 29-Oct-2012 Posts: 4173
From: Germany | | |
|
| |
Status: Offline |
|
|
cdimauro
|  |
RISC-V Posted on 2-May-2021 5:37:06
| | [ #12 ] |
|
|
 |
Elite Member  |
Joined: 29-Oct-2012 Posts: 4173
From: Germany | | |
|
| |
Status: Offline |
|
|
cdimauro
|  |
SuperH / J2 Posted on 2-May-2021 5:37:18
| | [ #13 ] |
|
|
 |
Elite Member  |
Joined: 29-Oct-2012 Posts: 4173
From: Germany | | |
|
| |
Status: Offline |
|
|
cdimauro
|  |
Embedded Posted on 2-May-2021 5:37:31
| | [ #14 ] |
|
|
 |
Elite Member  |
Joined: 29-Oct-2012 Posts: 4173
From: Germany | | |
|
| |
Status: Offline |
|
|
cdimauro
|  |
NEx64T Posted on 2-May-2021 5:38:09
| | [ #15 ] |
|
|
 |
Elite Member  |
Joined: 29-Oct-2012 Posts: 4173
From: Germany | | |
|
| |
Status: Offline |
|
|
cdimauro
|  |
Future Topic Posted on 2-May-2021 5:38:23
| | [ #16 ] |
|
|
 |
Elite Member  |
Joined: 29-Oct-2012 Posts: 4173
From: Germany | | |
|
| |
Status: Offline |
|
|
cdimauro
|  |
Future Topic Posted on 2-May-2021 5:38:34
| | [ #17 ] |
|
|
 |
Elite Member  |
Joined: 29-Oct-2012 Posts: 4173
From: Germany | | |
|
| |
Status: Offline |
|
|
cdimauro
|  |
Future Topic Posted on 2-May-2021 5:38:45
| | [ #18 ] |
|
|
 |
Elite Member  |
Joined: 29-Oct-2012 Posts: 4173
From: Germany | | |
|
| |
Status: Offline |
|
|
cdimauro
|  |
Future Topic Posted on 2-May-2021 5:38:57
| | [ #19 ] |
|
|
 |
Elite Member  |
Joined: 29-Oct-2012 Posts: 4173
From: Germany | | |
|
| |
Status: Offline |
|
|
cdimauro
|  |
Future Topic Posted on 2-May-2021 5:39:11
| | [ #20 ] |
|
|
 |
Elite Member  |
Joined: 29-Oct-2012 Posts: 4173
From: Germany | | |
|
| |
Status: Offline |
|
|