Skip to content

CoreMark reimagined – the EM•Mark suite

Virtually all MCU vendors run CoreMark® – the premier industry benchmark for meas­uring CPU performance within embedded systems.  But to best capture the additional memory and power con­straints of typical EM applications, we've transformed CoreMark into EM•Mark .

Why another MCU benchmark

CoreMark encompasses four algorithms that reflect typical workloads found in embedded application programs targeting resource-constrained MCUs:

list processing   find and remove elements; generalized sorting
matrix manipulation   add and multiply by a scalar, vector, or matrix
state machine   scan a string for a variety of numeric formats
cyclic redundancy check   checksum over a sequence of 16- / 32-bit values

Openly and freely available on GitHub , anyone could port CoreMark's C code to their own hardware platform.  To boost the score reported by this CPU-centric benchmark, MCU vendors will select the most aggressive optimize-for-speed options when compiling CoreMark.

In practice, however, most developers targeting resource-constrained MCUs will select the most aggressive optimize-for-space options when compiling their applications; these applications also have aggressive energy requirements outside of CoreMark's scope.

FULL DISCLOSURE – My limited knowledge of EEMBC ULPMark®

Expanding beyond legacy CoreMark, the EEMBC  organization now offers a broad range of benchmark suites targeting every imaginable facet of embedded processing – including ULPMark .

Focused on overall energy efficiency within ultra-low-power MCUs, ULPMark defines the workload of a typical duty-cycled application – one that spends most of its time in the MCU's deep-sleep mode, and that awakens infrequently to execute a relatively small amount of code.  Less energy [ μJ ]  ⇒  higher ULPMark scores.

But unlike CoreMark, the more recent EEMBC benchmarks require consortium membership or a paid license (though reasonably priced for universities and non-profits).  While completely rational from a fiscal perspective, the EEMBC icensing model does impede inquisitive engineers from simply "playing" with these benchmarks.

Finally, I'd like to acknowledge Jospeh Yiu – who has worked closely with EEMBC in developing ULPMark, and with whom I spoke when initially making inquiries in mid-2023.  Subsequent conversations with Joseph proved quite insightful – and in fact inspired and encouraged the transformation of CoreMark in EM•Mark .

To that end, EM•Mark offers an open-source benchmark (written in EM, of course) tailored for resource-constrained MCUs – the sweet spot for the language and its runtime.  Any MCU supporting EM(1)now has a ready-to-run test suite for characterizing system performance.

  1. see this post to learn more

But we have an even broder objective for EM•Mark !!

EM•Mark exemplifies how we can transform a "typical" body of legacy C code [ CoreMark ] into qualitatively  higher-level software, which not only produces the same results but does so with quantitatively  higher-levels of performance.

What will EM•Mark measure

The EM•Mark suite focuses on four distinct metrics that help characterize the MCU as well as the C/C++ compiler used in a resource-constrained application environment:

program size   different compilers, different options – text+const+data+bss sections
execution time   multiple iterations of the benchmark algorithms – C vs EM, Flash vs SRAM
active power   multiple iterations of the benchmark algorithms – C vs EM, Flash vs SRAM
energy efficiency   one benchmark iteration after awakening from one second of deep-sleep

While primarily intended to measure one MCU + compiler combo against another (much like legacy CoreMark),  EM•Mark also grants us an opportunity to qualitatively and quantitatively benchmark a base of C code against its transformation into EM.

How can you get involved

follow The EM Foundation on LinkedIn  where we'll publish EM•Mark results

jump into the EM Technical Overview  if you haven't done so already

explore the CoreMark sources on GitHub – a "typical" body of legacy C code

Happy coding !!!   🌝   💻