3 ms·
They are not really comparing implementations of the same algorithm, as there are two differences between C++ version's update rule and the other two versions'.
by The_suffocated 9y ago
They are not really comparing implementations of the same algorithm, as there are two differences between C++ version's update rule and the other two versions'. First, from the image in the article, rule 30 should map 111, 110, 101, 000 to 0 and the other four possibilities to 1 (the Python and Numba versions are indeed doing this), but this is not what the C++ version does. Now this should NOT affect the program's speed, but the second difference does favour Python and Numba: the array is cyclic in the C++ version but not in the other two versions.