Well you expect 2-4 times better performance for a program that spends all its time in the Python interpreter's C code. And that's simply unreasonable. In addition to that you use a severely outdated Nim version and Nim's `find` operation uses the Boyer-Moore Horspool algorithm which is typically worse than an SSE brute force solution would be.
- Performance against Python: find substring in string nyggus
- Performance against Python: find substring in string Araq
- Performance against Python: find substring in str... alexeypetrushin
- Performance against Python: find substring in... nyggus
- Performance against Python: find substrin... doofenstein
- Performance against Python: find sub... ynfle
- Performance against Python: find... nyggus
- Performance against Python: ... Araq
- Performance against Python: ... Araq
- Performance against Python: ... nyggus
- Performance against Python: ... Araq
- Performance against Python: ... nyggus
- Performance against Python: ... PMunch
- Performance against Python: ... Araq
- Performance against Python: ... shirleyquirk
- Performance against Python: ... nyggus
- Performance against Python: ... xigoi
- Performance against Python: ... bpr