2004-01-14 Added RVCT 2.0.1 numbers
2003-11-26 Added GCC 3.4 (20031105 experimental) numbers
2002-10-14 Added GHS 3.6 numbers
2002-05-29 Added GCC 3.1 numbers
2002-04-03 Added ARM ADS v1.2 thumb interwork numbers and realized I had the Mips calculation wrong all along
2002-04-02 Added ARM ADS v1.2 numbers
2002-03-14 I must have lost my new GCC numbers have some now and some new GHS numbers
2002-02-25 Ahhh, thanks Jeff, I didnt know about the wait state control for ROM.
2002-02-24 Fixed/added GCC Numbers, still needs work.
2002-02-24 Ran a couple of Dhrystones with the prefetch buffer enabled.
2002-02-21 Added "queens" program to demonstrate that with zero wait state 32-bit memory arm is faster than thumb, see the queen stuff below

I have been doing some experiments with various compilers. What I have done is compile Dhrystone v2.1 on each of the compilers using the best optimization, arm, thumb, and interwork where available (and when I have the patience for all three).

ARM mode means strictly 32 bit ARM instructions. Thumb mode means try to use all thumb instructions, which isnt completely possible. Interwork is somewhere in between, use thumb when you can, put some overhead in it so that it can link and run with 32 compiled code.


ARM RVCT (ARM RealView Compiler Tools) v2.0.1 The eval CD is encrypted so it only runs on the eval armulator, dont bother.
Source and binary, ARM and THUMB mode (updated 2004-01-14)

ARM ADS (ARM Developers Suite) v1.1, right from the horses mouth. Costs about $6K, price on the web page. Free eval on CD.
Source and binary, ARM mode (updated 2002-01-03)
Source and binary, thumb interwork (updated 2002-01-03

ARM SDT (Software Developers Kit) v2.5, again right from the horses mouth. This one has been replaced by ADS above.
Source and binary, ARM mode (updated 2002-01-15)
Source and binary, thumb mode (updated 2002-01-15)

Metaware v4.5a, stumbled across this one and found it easy to use and a very good performer. Quoted around $8K. Downloadable eval.
Source and binary, ARM mode (updated 2002-01-12)
Source and binary, thumb mode (updated 2002-01-15)
Source and binary, interwork (updated 2002-01-15)

Green Hills, this one is quite popular in the embedded world, I dont know what it costs, I think you can get an eval version. I dont have the source and binary available at this time.
GCC, this is a pre-built, ready-to-run windows GCC 3.x. There are others, this is the one I tried and liked. Price: free download.
Source and binary, (updated 2002-02-24)
Source and binary, (-mthumb) (updated 2002-02-24)
Source and binary, easier to compile (updated 2002-05-29)
I had a problem compiling the dhrystone for thumb mode on gcc 3.1. The performance difference between GCC 3.0.4 and 3.1 was quite small 0.2%.

Thumb compile:
dhry_1.c: In function `Proc_1':
dhry_1.c:292: Internal compiler error in pre_insert_copy_insn, at gcse.c:4859
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

I have been trying to do four different compiles for each type, not all have been updated to match this plan
test.bin puts the code in ROM (0x8000000) and the data in IWRAM (0x3000000)
test2.bin puts the code in EWRAM (0x2000000) and the data in IWRAM
test3.bin puts the code and data in EWRAM
test4.bin puts the code in ROM and the data in EWRAM


I think I have been calculating Mips wrong. The test runs 2000 loops, the timer is set with the prescaler at 11b which is 61.025us per tick.
So mips = 2000 / ( 1757 * 61.025e-6 * ticks)
Ahh I had 65us per tick which is wrong, sorry I will have to fix all these numbers


3345 5.58 Mips ARM RVCT 2.0.1 ARM ROM/EWRAM 3/1 prefetch
4078 4.57 Mips ARM RVCT 2.0.1 ARM ROM/EWRAM 3/1 no prefetch
2959 6.30 Mips ARM RVCT 2.0.1 ARM ROM/IWRAM 3/1 prefetch
3502 5.33 Mips ARM RVCT 2.0.1 ARM ROM/IWRAM 3/1 no prefetch
3067 6.08 Mips ARM RVCT 2.0.1 THUMB ROM/EWRAM 3/1 prefetch
3697 5.05 Mips ARM RVCT 2.0.1 THUMB ROM/EWRAM 3/1 no prefetch
2536 7.35 Mips ARM RVCT 2.0.1 THUMB ROM/IWRAM 3/1 prefetch
3101 6.02 Mips ARM RVCT 2.0.1 THUMB ROM/IWRAM 3/1 no prefetch
4754 3.92 Mips ARM ADS v1.2 arm (test.bin) prefetch buffer enabled
5348 3.49 Mips ARM ADS v1.2 arm (test.bin)
4852 3.84 Mips ARM ADS v1.2 arm (test2.bin)
5437 3.43 Mips ARM ADS v1.2 arm (test3.bin)
5934 3.14 Mips ARM ADS v1.2 arm (test4.bin)
3790 4.92 Mips ARM ADS v1.2 thumb (test.bin) prefetch buffer enabled
4426 4.21 Mips ARM ADS v1.2 thumb (test.bin)
3785 4.92 Mips ARM ADS v1.2 thumb (test2.bin)
4381 4.26 Mips ARM ADS v1.2 thumb (test3.bin)
5022 3.71 Mips ARM ADS v1.2 thumb (test4.bin)
4469 4.17 Mips ARM ADS v1.2 thumb interwork (test.bin)
3813 4.89 Mips ARM ADS v1.2 thumb interwork (test2.bin)
4408 4.23 Mips ARM ADS v1.2 thumb interwork (test3.bin)
5065 3.68 Mips ARM ADS v1.2 thumb interwork (test4.bin);
5381 ARM ADS v1.1 ARM (test.bin)
4877 ARM ADS v1.1 ARM (test2.bin)
5463 ARM ADS v1.1 ARM (test3.bin)
5967 ARM ADS v1.1 ARM (test4.bin)
4497 ARM ADS v1.1 interwork (test.bin)
3833 ARM ADS v1.1 interwork (test2.bin)
4428 ARM ADS v1.1 interwork (test3.bin)
5092 ARM ADS v1.1 interwork (test4.bin)
5330 ARM SDT 2.5 ARM (test.bin) prefetch buffer enabled
6033 ARM SDT 2.5 ARM (test.bin)
5424 ARM SDT 2.5 ARM (test2.bin)
6033 ARM SDT 2.5 ARM (test3.bin)
6643 ARM SDT 2.5 ARM (test4.bin)
3727 ARM SDT 2.5 thumb (test.bin) prefetch buffer enabled
4477 ARM SDT 2.5 thumb (test.bin)
3742 ARM SDT 2.5 thumb (test2.bin);
4352 ARM SDT 2.5 thumb (test3.bin);
4477 ARM SDT 2.5 thumb (test4.bin);
7135 GCC devkitadv (test.bin) prefetch buffer enabled
7922 GCC devkitadv (test.bin)
7168 GCC devkitadv (test2.bin)
7168 GCC devkitadv (test3.bin)
7922 GCC devkitadv (test4.bin)
5030 GCC devkitadv -mthumb (test.bin) prefetch buffer enabled
5836 GCC devkitadv -mthumb (test.bin)
4871 GCC devkitadv -mthumb (test2.bin)
4871 GCC devkitadv -mthumb (test3.bin)
5836 GCC devkitadv -mthumb (test4.bin)
5217 Metaware 4.5a ARM (test.bin)
4271 Metaware 4.5a ARM (test2.bin)
5297 Metaware 4.5a ARM (test3.bin)
5793 Metaware 4.5a ARM (test4.bin)
5444 Metaware 4.5a interwork (test.bin)
4920 Metaware 4.5a interwork (test2.bin)
5496 Metaware 4.5a interwork (test3.bin)
6019 Metaware 4.5a interwork (test4.bin)
4444 Metaware 4.5a thumb (test.bin)
3802 Metaware 4.5a thumb (test2.bin)
4378 Metaware 4.5a thumb (test3.bin)
5020 Metaware 4.5a thumb (test4.bin)
8205 GHS 3.0.1 ARM EWRAM/IWRAM
9303 GHS 3.0.1 ARM ROM/IWRAM
5444 GHS 3.0.1 thumb EWRAM/IWRAM
6623 GHS 3.0.1 thumb ROM/IWRAM
7217 GCC 3.0.4 (homebrew) ARM EWRAM/IWRAM
7967 GCC 3.0.4 (homebrew) ARM ROM/IWRAM
4903 GCC 3.0.4 (homebrew) THUMB EWRAM/IWRAM
5871 GCC 3.0.4 (homebrew) THUMB ROM/IWRAM
7652 GCC 2.95.3 (homebrew) ARM EWRAM/IWRAM
7950 GCC 3.1 (homebrew) ARM ROM/IWRAM
7200 GCC 3.1 (homebrew) ARM EWRAM/IWRAM
9627 GHS (1.8.9) ROM/IWRAM

arm-thumb-elf-gcc (GCC) 3.4 20031105 (experimental)
3660 5.10 Mips GCC 3.4 (20031105 unstable) THUMB ROM/EWRAM 3/1 prefetch
4430 4.21 Mips GCC 3.4 (20031105 unstable) THUMB ROM/EWRAM 3/1 no prefetch
3112 5.99 Mips GCC 3.4 (20031105 unstable) THUMB ROM/IWRAM 3/1 prefetch
3840 4.86 Mips GCC 3.4 (20031105 unstable) THUMB ROM/IWRAM 3/1 no prefetch
Source and binary (updated 2003-11-25)
arm-thumb-elf-gcc (GCC) 3.3.2 (with gcse.c modified)
4164 4.48 Mips GCC 3.3.2 (modified) THUMB ROM/EWRAM 3/1 prefetch
5019 3.72 Mips GCC 3.3.2 (modified) THUMB ROM/EWRAM 3/1 no prefetch
3592 5.19 Mips GCC 3.3.2 (modified) THUMB ROM/IWRAM 3/1 prefetch
4387 4.25 Mips GCC 3.3.2 (modified) THUMB ROM/IWRAM 3/1 no prefetch
same source as above

Okay, I see there is more than just the prefetch buffer enable but wait state control on the ROM. I am using a 64MB Visoly Flash cart and an MBV2 cable to program.

Thumb C Compiler, ADS1.2 [Build 805]
4426 WAITCNT 4/2 no prefetch
3790 WAITCNT 4/2 prefetch
4106 WAITCNT 3/2 no prefetch
3639 WAITCNT 3/2 prefetch
3785 WAITCNT 2/2 no prefetch
3488 WAITCNT 2/2 prefetch
5707 WAITCNT 8/2 no prefetch
4391 WAITCNT 8/2 prefetch
3611 WAITCNT 4/1 no prefetch
2867 WAITCNT 4/1 prefetch
3292 WAITCNT 3/1 no prefetch
2715 WAITCNT 3/1 prefetch 6.87 Mips
2971 WAITCNT 2/1 no prefetch
2563 WAITCNT 2/1 prefetch 7.28 Mips
4892 WAITCNT 8/1 no prefetch
3477 WAITCNT 8/1 prefetch
Thumb C Compiler, ADS1.1 [Build 723]
4454 WAITCNT 4/2 no prefetch
3817 WAITCNT 4/2 prefetch
4128 WAITCNT 3/2 no prefetch
3663 WAITCNT 3/2 prefetch
3804 WAITCNT 2/2 no prefetch
3507 WAITCNT 2/2 prefetch
5750 WAITCNT 8/2 no prefetch
4434 WAITCNT 8/2 prefetch
3637 WAITCNT 4/1 no prefetch
2892 WAITCNT 4/1 prefetch
3312 WAITCNT 3/1 no prefetch
2737 WAITCNT 3/1 prefetch 6.82 Mips
2988 WAITCNT 2/1 no prefetch
2580 WAITCNT 2/1 prefetch 7.23 Mips
4933 WAITCNT 8/1 no prefetch
3518 WAITCNT 8/1 prefetch
MetaWare High C Compiler R4.5a (THUMB)
3305 WAITCNT 3/1 no prefetch
2688 WAITCNT 3/1 prefetch 6.94 Mips
2985 WAITCNT 2/1 no prefetch
2547 WAITCNT 2/1 prefetch 7.32 Mips
GHS 3.0.1 (ARM)
6783 WAITCNT 3/1 no prefetch
5631 WAITCNT 3/1 prefetch
GHS 3.0.1 (THUMB)
5026 WAITCNT 3/1 no prefetch
3897 WAITCNT 3/1 prefetch
GHS 3.5 (ARM)
4965 WAITCNT 3/1 no prefetch
4122 WAITCNT 3/1 prefetch
GHS 3.5 (THUMB)
4695 WAITCNT 3/1 no prefetch
3674 WAITCNT 3/1 prefetch
GHS 3.6 (ARM)
4678 WAITCNT 3/1 no prefetch
3887 WAITCNT 3/1 prefetch
GCC 3.0.4 (homebrew) (ARM)
5724 WAITCNT 3/1 no prefetch
4941 WAITCNT 3/1 prefetch
GCC 3.0.4 (homebrew) (THUMB)
4416 WAITCNT 3/1 no prefetch
3668 WAITCNT 3/1 prefetch
GCC 3.1 (homebrew) (ARM)
5707 WAITCNT 3/1 no prefetch
4959 WAITCNT 3/1 prefetch

More curiosities (no binaries):
GCC -O0 optimizations 13441
GCC -O1 optimizations 7457
GCC -O2 optimizations 7334
GCC -O3 optimizations 7218
ARM SDT -O0 optimizations 6537
ARM SDT -O1 optimizations 5658
ARM SDT -O2 optimizations 5424

Queens
The queens problem is to take a chess board with N x N squares and N queens and to time how long it takes to find all of the combinations where no queen can attack any other queen.
I have solved for N = 8, 9, and 10. All of this is in the 32K at 0x3000000 which is zero wait state memory with a 32-bit bus. GCC 3.0.2 is just too big to fit, I was trying to minimize my font tiles but that didnt help and the output of objcopy is strange and so is the elf file, so I have not gotten this test to work with GCC...

Norcroft ARM C vsn 4.90 (ARM Ltd SDT2.50) [Build number 80]
528, 2345, 10910
Norcroft Thumb C vsn 1.20 (ARM Ltd SDT2.50) [Build number 80]
608, 2701, 12564
ARM C Compiler, ADS1.1 [Build 723]
503, 2234, 10383
Thumb C Compiler, ADS1.1 [Build 723]
616, 2733, 12702
MetaWare High C Compiler R4.5a(ARM)
405, 1784, 8229
MetaWare High C Compiler R4.5a (THUMB)
576, 2546, 11786
Green Hills 1.8.9 arm
547, 2414, 11148
Green Hills 1.8.9 thumb
I cant do thumb with this install probably pilot error
Green Hills 3.01 arm
538, 2375, 10978
Green Hills 3.01 thumb
682, 3027, 14072
Green Hills 3.5
576, 2559, 11885
Green Hills 3.5 thumb
778, 3461, 16126
Downloads (binaries named final.bin)
ARM SDT Source and Binaries, updated 2002-02-22
ARM ADS Source and Binaries, updated 2002-02-22
Metaware Source and Binaries, updated 2002-02-22
Green Hills 1.8.9 Source and Binaries, updated 2002-02-22
Green Hills 3.0.1 Source and Binaries, updated 2002-02-22
Green Hills 3.5 Source and Binaries, updated 2002-02-22