Running CoreMark on a Jailbroken Calculator - 2024

--- TODO: finish article and add images ---

This was for a school project (Operating Systems) that could have been much easier until I decided to make it significantly harder for fun.

CoreMark is an industry-standard benchmark for embedded devices written in device-agnostic C. Only a handful of functions, mostly for timekeeping purposes, have to be ported over to a device for it to run. For my project, we could have taken the easy road and simply done a survey project or some simple programming project like many others, but instead we thought it would be fun to port CoreMark, just like how all the cool computer engineers port Doom and Bad Apple to random machines.

Devices ported:

  • group partner's laptop on WSL2 (easy)
  • my PC (easy)
  • my laptop (easy)
  • raspberry pi (easy)
  • Arduino Uno (ATmega328P) (surprisingly difficult)
  • TI-84 Plus CE (surprisingly easy but unusually slow)
  • TI-Nspire CX (extremely difficult, almost gave up)

The results:

  • TI-84 Plus CE was the slowest, despite its three-stage pipeline and 50 MHz CPU. We concluded that there may be a ton of overhead when running asm code on the 84 calculators
  • TI-Nspire CX does not support running compiled code, but my calculator is jailbroken and was previously used to post on Twitter with a USB wifi dongle. However, it does not come with drivers for its ARM SP804 hardware timer. We did not have time to write our own driver, but it would have been fun. Instead, the timer we could use had a precision of 1 second, so we ran the benchmark for 1000 seconds to obtain 4 sig figs of precision.
  • Abusing the Arduino library is totally valid

What did we learn?

If you want to boil some C, you gotta crack the compiler, or whatever the saying is. We learned that we put in way too much effort into our final project when we presented it, but we had a ton of fun porting it over. All I cared about was porting it to the TI-Nspire, as I had a friend who wrote benchmarks in TI BASIC for the Nspire and C for the 84 and found that the Nspire was significantly slower, making her reach the conclusion that the Nspire is significantly slower. I was glad to prove her wrong and defend the Nspire's name.

Related Articles

Notes Website - 2021