Try `newSeqOfCap` for speed. I dont think you need `--threads:on`.
You are not using set on the code. Being pure math that can be a `func` instead of `proc` but thats really just style. Nimpy wont care about Python version, as long as is C API compatible it will work. AFAIK.
