A short experiment comparing three implementations of a Mandelbrot set generator: pure Python with PIL, Cython with PIL, and Cython with C++ bindings to SFML. Benchmarks on a 4000px-wide image show pure Python takes 106 seconds, Cython with PIL drops it to 4.27 seconds (25x speedup), and Cython with C++ SFML bindings further reduces it to 3.21 seconds. Source code is available for download.

1m read timeFrom mattkeeter.com
Post cover image
Table of contents
AboutImagesBenchmarksDownload

Sort: