Longest Common Substring algorithm implemented in python and optimized for speed (cython