This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Chain tool speed

Hello I'v just ordered a NRF51-DK kit.

I'm looking at the different tool chain. In my application speed is critical 16Mhz is actually bearly enough, so my question is:

-Is there a difference in the execution speed of the same code written : Keil , eclipse GCC, or Mbed?

-I see that the NRF51-DK is actually running at 32Mhz, is this ok to put a 32 Mhz Cristal to a nRF51822??

Thanks

Parents
  • It's all about how you write your code. Knowing how the compiler generate code and write optimize code would be the latest. One compiler with same setting you can have 2 sets of code with one running faster the the other.

    A simple example

    a = b / 2;  // Takes many cpu cycles
    a = b >> 1; // only 1 cycle
    

    Compiler will not optimize that for you.

    There is a good book on writing optimized code.

    "C++ Footprint and Performance Optimization" by Rene Alexander & Grahm Bensley. Published by SAMS. ISBN 0-672-31904-7

    PS. mBed not recommended for speed.

Reply
  • It's all about how you write your code. Knowing how the compiler generate code and write optimize code would be the latest. One compiler with same setting you can have 2 sets of code with one running faster the the other.

    A simple example

    a = b / 2;  // Takes many cpu cycles
    a = b >> 1; // only 1 cycle
    

    Compiler will not optimize that for you.

    There is a good book on writing optimized code.

    "C++ Footprint and Performance Optimization" by Rene Alexander & Grahm Bensley. Published by SAMS. ISBN 0-672-31904-7

    PS. mBed not recommended for speed.

Children
No Data
Related