Yes, wrapped everything in main: [https://gist.github.com/def-/4e4dea8f0f40ef7a77a2729148d8fe0e](https://gist.github.com/def-/4e4dea8f0f40ef7a77a2729148d8fe0e)
You could try a more recent GCC version (7.3.1 here). `nim -d:release --gcc.options.speed="-Ofast -flto -fno-strict-aliasing -ffast-math" --gcc.options.linker="-flto" c app` but measure which actually make a difference, if any. I get 0.08 - 0.12 s with `nim --cc:clang -d:release --clang.options.speed="-Ofast -flto -fno-strict-aliasing -ffast-math" --clang.options.linker="-flto" c app` using Clang 6.0.0.