It doesn't matter if it was `discard` or something else, the compiler simply understands that this loop doesn't change anything, so the "program" works fine without it, so it just removed that loop. For keeping the results you have to use some clever tricks, e.g. in @treeform 's benchy there's a `keep` procedure to tell the compiler to not optimize a specific return value away - <https://github.com/treeform/benchy/blob/master/src/benchy.nim#L50>
- Performance against Python: find substring in string Stefan_Salewski
- Performance against Python: find substring in string nyggus
- Performance against Python: find substring in string holgerschurig
- Performance against Python: find substring in string holgerschurig
- Performance against Python: find substring in string Niminem
- Performance against Python: find substring in string nyggus
- Performance against Python: find substring in string Araq
- Performance against Python: find substring in string nyggus
- Performance against Python: find substring in string Yardanico
- Performance against Python: find substring in string nyggus
- Performance against Python: find substring in string Yardanico
- Performance against Python: find substring in string nyggus
- Performance against Python: find substring in string federico3
- Performance against Python: find substring in string cblake
- Performance against Python: find substring in string Clonk
- Performance against Python: find substring in string SunnyCorleone
- Performance against Python: find substring in string Araq