The culprit here is `a_list: Vec<Vec<f64>>`, which means the list of lists is copied as a whole, hence why the rust version is slower.
In general, rust is at least as fast as C or C++, but this seems to be a special case.
In general, rust is at least as fast as C or C++, but this seems to be a special case.