python is faster on the Macbook but c++ is MUCH faster on the RasPi