I wanted to check how much faster a C version would be. As it turns out it is *MUCH* faster, the python version takes ca. 12s, the C version takes a few milliseconds.