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>

Reply via email to