[21:49:46] I tried a comparison between a Python implementation calling the regex library to do a replace at end, and an implementation using a composition of other string functions to do the same thing (input کرنا output کرنی) [21:49:47] Python: 1339 ms [21:49:48] Compisition: 2375 ms [21:49:50] [21:49:51] More substantial than I was expecting (re @vrandecic: It depends on the algorithm. My intuitions about this have been surprisingly often wrong. Try it out!)