Snake Oil

A picture of the Chinese water snake curtesy of the Hong Kong Biodiversity Information Hub (part of the Agriculture, Fisheries and Conservation Department)

whoami

Sindre Nistad

pronounced similar to cinder 🔥

Consultant @ Bouvet 🐧

						
						                                                     *
						                                                   ****
						                                                  ******
						                                                   *****
						                                              * *********
						                                         *** ****************
						                                           ******************** **
						                                        *************************
						                                       ****************************
						                                     *******************************
						                                     ******************************
						                        * *****     ********************************
						                       ***********  ********************************
						                      ************* *******************************
						                  ** ************** ******************************
						****************************************************************
						                  ** ************** ******************************
						                      ************* *******************************
						                       ***********  ********************************
						                        * *****     ********************************
						                                     ******************************
						                                     *******************************
						                                       ****************************
						                                        *************************
						                                           ******************** **
						                                         *** ****************
						                                              * *********
						                                                   *****
						                                                  ******
						                                                   ****
						                                                     *
					

Showtime!

Profiling

numpy.ufunc

cython


					# cython: profile=True
					# cython: linetrace=True
					# distutils: define_macros=CYTHON_TRACE_NOGIL=1
				

NOTE: Can be veryslow

Rust

Rust

via maturin &$PyO_3$

numba

Nvidia CUDA

Nvidia CUDA

via cuda-core

There is also PyOpenCL

Other tools

Source code & presentation

QR code to the repository for the source code and presentation. Points to https://github.com/sindre-nistad/snake-oil

Addendum

Sources

Further reading

Mandelbrot

Mandelbrot

A (complex) number $c$ is in the Mandelbrot set if

$ |z_{n}| \le 2 $

for all $ n \ge 0 $ \[\begin{aligned} z_{0} = 0 \\ z_{n+1} = z_{n}^2 + c \end{aligned}\]

Video explainers