0

There is an abundance of IDEs and toolchains for the Arm Cortex architecture for C/C++.

Lately, faced with a hard speed optimization issue on my STM Cortex-M3, I started wondering if there are indeed performance differences (in terms of output code execution speed), between different vendors, as some of them claim.

More specifically, between the GNU-C copiler and commercial ones.

Did someone do a comparison between different compilers in this sense?

artless noise
  • 21,212
  • 6
  • 68
  • 105
bavaza
  • 10,319
  • 10
  • 64
  • 103
  • 1
    this is discussion oriented – Caffeinated Jan 18 '15 at 20:19
  • Related (possibly not _quite_ duplicate): http://stackoverflow.com/questions/27908760/arm-cortex-m-compiler-differences – Notlikethat Jan 18 '15 at 20:32
  • @coffee - yes, I'm aware if that. That's why I asked for benchmarks, not opinions (though I would appreciate them too). – bavaza Jan 19 '15 at 05:27
  • There are always going to be speed differences between different compiler vendors and versions. If you want the fastest code, write assembly language for your time-critical parts. If performance is that critical, it's worth the extra hassle. – BitBank Jan 19 '15 at 10:59
  • The M3 is stuck with thumb1, and thus, there's hardly room for hand optimizations. The compiler generated machine codes may vary in quality, albeit not much. Just check disassembly of performance critical routines if the compiler is doing something very stupid, and you will be fine. – Jake 'Alquimista' LEE Jan 19 '15 at 12:35
  • 1
    m3 is armv7m so it supports thumb the armv7m thumb2 extensions, not limited to the original thumb. To the OP, yes the same compiler as well as different compilers will produce vastly different code from the same high level source, in particular performance related. There are other considerations too, just running the microcontroller as fast as it goes you have to add wait states to many of the implementations of flash (not all have this problem) so your code speed may still be limited. Can try running well optimized code from sram for example and compare speeds... – old_timer Jan 19 '15 at 21:18
  • or get something in the cortex-m4 family faster clock rates, i and d caches, etc. Or maybe a cortex-m just wont work for what you are doing... – old_timer Jan 19 '15 at 21:19
  • 1
    I found this analysis quite insightful. http://www.google.at/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0CCYQFjAB&url=http%3A%2F%2Fraisonance.com%2Ftzr%2Fscripts%2Fdownloader2.php%3Ffilename%3DT020%2Fmedia%2F07%2Fc9%2F1kmm1akx6gr%26mime%3Dapplication%2Fpdf%26originalname%3DAN0052-ARM-C-Benchmark.pdf%26moid%3D97&ei=KpQ-VYSEM43X7Ab5pYB4&usg=AFQjCNGVMMmYaLjLmt7S3qPObQtNci-uHg&sig2=Tln62inOnUibB8kU5jYu8Q&bvm=bv.91665533,d.ZGU&cad=rjt It is difficult to find comparisons since most compiler vendors prohibit publishing benchmarks in their licence agreement. – Pait Apr 27 '15 at 19:58

1 Answers1

0

Practical Speaking Binaries Generated from Commercial IDEs Are more Optimized and Smaller in code size than Ones Generated by GCC , The difference is there but not so big and May even get close to nothing with a little bit of effort With some optimization, I Personally don't think that you will find Any clear benchmark for Commercial Toolchains vs GCC based Ones, Speed and Size Really do depend on so many factors.