Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: Benchmark

  1. #1
    Junior Member
    Join Date
    Nov 2021



    What is the best way to test a microcontroller for its computing speed, read and write rate
    Last edited by NewUser; 11-26-2021 at 02:43 PM.

  2. #2
    Senior Member
    Join Date
    Jul 2020
    I guess a benchmark suite, rather than just one benchmark program, so that different styles of coding are
    covered such as integer, floating point, DSP, decision logic, function-call intensive, memory intensive, etc etc

    One thorny issue is separating raw metal performance from compiler optimization performance - unless you
    want to rewrite your benchmark code in assembler for each architecture you are seeing the hardware through
    the veil of the compiler's ability to optimize well for the particular architecture.

    I guess its pretty moot what is meant by "best way" anyhow - best from the perspective of the chip manufacturer?
    from the perspective of a C programmer?

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    For microcontroller compute speed, usually CoreMark is used. Here is a copy which runs on Teensy and most other Arduino compatible boards.

    While CoreMark tests 3 widely used scenarios, the math test is 32 bit integer only, so it doesn't tell you much if you expect to use 32 or 64 bit floating point.

    Indeed CoreMark is also sensitive to compiler settings. Many chip manufacturers quote a best-case theoretical CoreMark number, not the actual speed you will get with compiled code in a real project. The numbers shown in that readme file are actual measurements on real hardware using the compiler settings normally used.

    For "read and write rate", tests are usually more hardware specific and not as easily comparable. There are also many different types of peripherals and different types of testing, especially bandwidth versus latency which are often at odds with each other with packet-based protocols, so there no simple single answer to such a short and vague question. You need to be more specific and give some context for that sort of question to be meaningful.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts