Macs in Chemistry

Insanely great science

 

Comparing Python on a M1 MacBook Pro Max with Intel MacBookPro (2016)

Python is probably the most widely used programming language in Cheminformatics at the moment and several readers have asked me to run a couple of benchmark tests. I've already tested a Jupyter notebook and that worked fine, the RDKit comparison also includes a fair amount of python code. Fortunately there are a few benchmarks that are well documented here https://benchmarksgame-team.pages.debian.net/benchmarksgame/index.html.

I used a couple of the benchmarks using the python implementation

Mandelbrot

Plot the Mandelbrot set [-1.5-i,0.5+i] on an N-by-N bitmap. Write output byte-by-byte in portable bitmap format.

Command used

time python -OO mandelbrot.py 16000

N-body

Model the orbits of Jovian planets, using the same simple symplectic-integrator.

Command used

time python -OO nbody.py 50000000

Binary-Trees

Command used

time python -OO binarytrees.py 21

The timings are shown in the table below.

TestIntel timeM1 max time M2 Air time
Mandelbrot 2 min 44s 34s 54s
N-body7 min 17s 3 min 57s 4 min 21s
BinaryTrees 46 sec 12 secs 16 secs


List of tools tested https://www.macinchem.org/reviews/MacBooks/m1macbookpromax.php

Last update 6 August 2022