• + 2 comments

    Good question. usually python3 is much faster than python2. i compared them in lots of exercises here. in this specific case python2 is really approximatly 20 % faster than 3. i solved this by using pypy3. (own test data 5000 characters for s1 and s2

    pypy3: 0,7 s

    python 3: 8,8 s

    python 2 7 s