proc main =
      var s = 0
      for i in 0 .. 1000000000:
        if i * i == 49:
        #if i == 7:
          s += 1
      echo s
    
    main()
    

For this test, using "if i == 7" instead of "if i * i == 49" gives half runtime 
on my box. This is a bit surprising as multiply is considered very fast 
generally.

Nim Compiler Version 0.18.0 [Linux: amd64]

Reply via email to