Yesterday I created a simple script to benchmark CPU's instruction execution speed with Python. I should not have use numpy since this library degraded the MIPS result a lot.

Another run for fun small Python program to benchmark your CPU's instruction speed (MIPS) is here. Just run (no dependency at all!) and enjoy the result.

https://brew.bsd.cafe/maulanahirzan/Python-Useful-Scripts/src/branch/main/MIPS-Benchmark

Python-Useful-Scripts

This repository contains useful programs written in Python

Brew: Brewing code over coffee

@maulanahirzan Seems to run faster writing output to a file than to the terminal (in my test).

screen:
=> Result : 1220176.98 IPS / 1.22 MIPS
(~ 5 sconds)
file:
=> Result : 8626522.56 IPS / 8.63 MIPS
(< 1 second)

@jspath55 I see. thanks for the feedback. I will test it immediately. 😊

EDIT: found the culprit in the run function. Thanks to you I found what code that degrades the MIPS result. The result still good with normal stdout now. I will update the git immediately. feel free to test it again.😉

@maulanahirzan More consistent results now, a range of +/- 20% overhead on my tests?

$ python3 ./MIPSBenchmark_2.py | grep MIPS\$
=> Result : 48304223.15 IPS / 48.30 MIPS
=> Result : 50137258.69 IPS / 50.14 MIPS
=> Result : 42309927.51 IPS / 42.31 MIPS
=> Result : 49413017.65 IPS / 49.41 MIPS
=> Result : 45110298.50 IPS / 45.11 MIPS
=> Result : 43321850.73 IPS / 43.32 MIPS
=> Result : 43241075.31 IPS / 43.24 MIPS
=> Result : 43026256.75 IPS / 43.03 MIPS
=> Result : 43497130.33 IPS / 43.50 MIPS

@jspath55 that's great. we have similar results. I am going to test this in my RPis

@maulanahirzan

That's cool - I recently upgraded my #GoPiGo3 #ROS_2 #Robot to #RaspberryPi5

50.62 MIPS on Pi5 running 64-bit #PiOSBookworm with #Python 3.11.2:

@cyclical_obsessive ooh nice result! thank you for testing my script 😊

@maulanahirzan I had not heard anyone talking MIPS in a long time.

Wiki: "Meaningless Indicator of Processor Speed" and Tom's Hardware:

https://www.tomshardware.com/news/overclocking-raspberry-pi-5#:~:text=The%20stock%20Raspberry%20Pi%205,4%27s%20score%20of%207568%20MIPS.

We Overclocked Raspberry Pi 5 to 3 GHz, Up to 25% Perf Boost

We were also able to push the GPU to 1,100 MHz.

Tom's Hardware