CPU benchmark by calculating Pi, powered by Python3

Overview

cpu-benchmark

Info:

  • CPU benchmark by calculating Pi, powered by Python 3.

Algorithm

  • The program calculates pi with an accuracy of 10,000 decimal places. The time spent on the calculation is counted as the test result. The result is determined by the average of 10 attempts. Lower is Better.

Supported architectures:

  • x86 (AMD, Intel)
  • ARM (Apple Silicon, Raspberry Pi, Qualcomm and etc)
  • VLIW* (МЦСТ Эльбрус)
  • RISC-V*

How to install

Install Python 3 from official website (Current)

https://www.python.org/downloads/

Install cpuinfo

pip install py-cpuinfo

Benchmark

python cpu-benchmark.py

Benchmark Results

CPU Arch OS Perfomance (Avg.) Verified
Apple M1 ARM macOS 11.5.2 19.534s
Intel Core i3-8100 x86 Windows 10 20H2 30.636s
Intel Xeon Gold 6125 x86 Linux (Hyper-V) 30.781s
You might also like...
Discord bot for calculating basic operations and formulas. (Early Development)

MathBot Discord bot for calculating basic operations and formulas. (Early Development) Commits Feel free to contribute to this bot by forking and pull

TextDescriptives - A Python library for calculating a large variety of statistics from text

A Python library for calculating a large variety of statistics from text(s) using spaCy v.3 pipeline components and extensions. TextDescriptives can be used to calculate several descriptive statistics, readability metrics, and metrics related to dependency distance.

A script depending on VASP output for calculating Fermi-Softness.
A script depending on VASP output for calculating Fermi-Softness.

Fermi softness calculation for Vienna Ab initio Simulation Package (VASP) Update 1.1.0: Big update: Rewrote the code. Use Bader atomic division instea

A program for calculating the divisor function

DivisorsFunctionCalculator A program for calculating the divisor function A script to find the "Sigma" (divisors function) of any number. To find the

Example for Calculating Robot Dynamics Using Pinocchio Library

A Example for Calculating Robot Dynamics Using Pinocchio Library Developed by: Xinyang Tian. Platform: Linux + Pinocchio. In this work, i use Pinocchi

PyPDC is a Python package for calculating asymptotic Partial Directed Coherence estimations for brain connectivity analysis.
PyPDC is a Python package for calculating asymptotic Partial Directed Coherence estimations for brain connectivity analysis.

Python asymptotic Partial Directed Coherence and Directed Coherence estimation package for brain connectivity analysis. Free software: MIT license Doc

A Python program for calculating the 95%CI for GNSS-derived site velocities

GNSS_Vel_95%CI A Python program for calculating the 95%CI for GNSS-derived site velocities Function_GNSS_95CI.py is a Python function for calculating

A super lightweight Lagrangian model for calculating millions of trajectories using ERA5 data
A super lightweight Lagrangian model for calculating millions of trajectories using ERA5 data

Easy-ERA5-Trck Easy-ERA5-Trck Galleries Install Usage Repository Structure Module Files Version iteration Easy-ERA5-Trck is a super lightweight Lagran

Tools for calculating and visualizing Elo-like ratings of MLB teams using Retosheet data
Tools for calculating and visualizing Elo-like ratings of MLB teams using Retosheet data

Overview This project uses historical baseball games data to calculate an Elo-like rating for MLB teams based on regular season match ups. The Elo rat

Cross Platform Application for Calculating Render Time
Cross Platform Application for Calculating Render Time

mdsanima-rt-go Cross Platform Application for Calculating Render Time. Testing This is a base application build on Windows Android and Linux. All buil

CALPHAD tools for designing thermodynamic models, calculating phase diagrams and investigating phase equilibria.

CALPHAD tools for designing thermodynamic models, calculating phase diagrams and investigating phase equilibria.

PyDateWaiter helps waiting special day & calculating remain days till that day with Python code.

PyDateWaiter (v.Beta) PyDateWaiter helps waiting special day(aniversary) & calculating remain days till that day with Python code. Made by wallga gith

This is the official repository for evaluation on the NoW Benchmark Dataset. The goal of the NoW benchmark is to introduce a standard evaluation metric to measure the accuracy and robustness of 3D face reconstruction methods from a single image under variations in viewing angle, lighting, and common occlusions. A fast, scalable, high performance Gradient Boosting on Decision Trees library, used for ranking, classification, regression and other machine learning tasks for Python, R, Java, C++. Supports computation on CPU and GPU.
A fast, scalable, high performance Gradient Boosting on Decision Trees library, used for ranking, classification, regression and other machine learning tasks for Python, R, Java, C++. Supports computation on CPU and GPU.

Website | Documentation | Tutorials | Installation | Release Notes CatBoost is a machine learning method based on gradient boosting over decision tree

Scalene: a high-performance, high-precision CPU and memory profiler for Python
Scalene: a high-performance, high-precision CPU and memory profiler for Python

scalene: a high-performance CPU and memory profiler for Python by Emery Berger 中文版本 (Chinese version) About Scalene % pip install -U scalene Scalen

A fast, scalable, high performance Gradient Boosting on Decision Trees library, used for ranking, classification, regression and other machine learning tasks for Python, R, Java, C++. Supports computation on CPU and GPU.
A fast, scalable, high performance Gradient Boosting on Decision Trees library, used for ranking, classification, regression and other machine learning tasks for Python, R, Java, C++. Supports computation on CPU and GPU.

Website | Documentation | Tutorials | Installation | Release Notes CatBoost is a machine learning method based on gradient boosting over decision tree

CPU inference engine that delivers unprecedented performance for sparse models
CPU inference engine that delivers unprecedented performance for sparse models

The DeepSparse Engine is a CPU runtime that delivers unprecedented performance by taking advantage of natural sparsity within neural networks to reduce compute required as well as accelerate memory bound workloads. It is focused on model deployment and scaling machine learning pipelines, fitting seamlessly into your existing deployments as an inference backend.

Lazy Profiler is a simple utility to collect CPU, GPU, RAM and GPU Memory stats while the program is running.
Lazy Profiler is a simple utility to collect CPU, GPU, RAM and GPU Memory stats while the program is running.

lazyprofiler Lazy Profiler is a simple utility to collect CPU, GPU, RAM and GPU Memory stats while the program is running. Installation Use the packag

Comments
  • Use all existing cores on CPU benchmark

    Use all existing cores on CPU benchmark

    Instead of taking benefit of all existing cores, the program only uses a single randomly selected core for all calculation. Newest 12-th Gen Intel CPU's have P-cores and E-cores respectively, and these cores does function in very different ways. Forcing in only one core, would make the benchmark results unreliable.

    Image

    image image

    Another thing I noticed that this problem only in Intel CPU's which have these core division. The only problem is that, certain times running a process on CPU parallel may not give much efficiency, and at the very first this is a CPU benchmark. At least that what I've seen here

    opened by rilysh 1
  • Idea: Better timing details

    Idea: Better timing details

    Cool tool. THX. I propose (PR to come in a few seconds) to better use time.perf_counter instead of time.time. That brings the following benefits:

    • time.perf_counter is monitonic (not influenced by DST or leap seconds)
    • time.perf_counter has a better resolution

    Best regards

    Bastian

    opened by Barry1 0
  • Comparison Windows / WSL

    Comparison Windows / WSL

    I tried this out on my computer running Windows and on WSL2 using Ubuntu, both on Python 3.10

    AMD Ryzen 9 3900X 12-Core Processor
    Windows: 38.707s
    WSL2: 24.703s
    

    Probably due to different BLAS libraries being used in both OSs. This will bias the results either way I guess, and changing ATLAS/BLAS will change the scores on the same CPU

    opened by skjerns 0
Owner
Alex Dedyura
IT Specialist | eobuv.ru
Alex Dedyura
It is a program that displays the current temperature of the GPU and CPU in real time and stores the temperature history.

HWLogger It is a program that displays the current temperature of the GPU and CPU in real time and stores the temperature history. Sample Usage Run HW

Xeros 0 Apr 5, 2022
Play music on Raspberry Pi Pico Without CPU involvement

MicroPython_PIO_Music_DMA Play music on Raspberry Pi Pico Without CPU involvement This is based on PIOBeep (https://github.com/benevpi/pico_pio_buzz)

null 3 Nov 27, 2022
Kwcpu - An unobtrusive CPU meter that fits in the default Windows 11 taskbar. Supports up to 32 cores.

kwcpu An unobtrusive CPU meter that fits in the default Windows 11 taskbar. Supports up to 32 cores. kwcpu is provided as a Rainmeter skin. By default

Jay Oster 2 Nov 7, 2022
Create a low powered, renewable generation forecast display with a Raspberry Pi Zero & Inky wHAT.

GB Renewable Forecast Display This Raspberry Pi powered eInk display aims to give you a quick way to time your home energy usage to help balance the g

Andy Brace 32 Jul 2, 2022
A Raspberry Pi Pico powered Macro board, like a Streamdeck but cheaper and simpler.

Env-MCRO A Raspberry Pi Pico powered Macro board, like a Streamdeck but cheaper and simpler. (btw this image is a bit outdated, some of the silkscreen

EnviousData 68 Oct 14, 2022
rPico KMK powered macropad with IPS screen

MacroPact rPico KMK powered macropad with IPS screen Idea/Desing: Sean Yin Build/Coding: kbjunky ( In case of any problems hit me up on Discord kbjunk

null 81 Dec 21, 2022
E-Ink Magic Calendar that automatically syncs to Google Calendar and runs off a battery powered Raspberry Pi Zero

E-Ink Magic Calendar that automatically syncs to Google Calendar and runs off a battery powered Raspberry Pi Zero

null 2.8k Dec 30, 2022
This is the remake of the program PYOBD. It works on Python3 and all new libraries. It was tested on Linux, Windows, and it should work on MAC too.

This is the remake of the program PYOBD. It works on Python3 and all new libraries. It was tested on Linux, Windows, and it should work on MAC too. You just need an ELM327 USB or bluetooth device and a PC(laptop preferably).

null 127 Jan 6, 2023
Django package to log request values such as device, IP address, user CPU time, system CPU time, No of queries, SQL time, no of cache calls, missing, setting data cache calls for a particular URL with a basic UI.

django-web-profiler's documentation: Introduction: django-web-profiler is a django profiling tool which logs, stores debug toolbar statistics and also

MicroPyramid 77 Oct 29, 2022
A python package for calculating the PESQ.

PyPESQ (WIP) Pypesq is a python wrapper for the PESQ score calculation C routine. It only can be used in evaluation purpose. INSTALL pip install https

Jingdong Li 269 Dec 18, 2022