Thanks for all the replies.

I will have to take some time later to analyze the more idiomatic code above 
and learn.

I understand my code may not appear to make sense. It's primary purpose is 
simply to provide somewhat of a stress test of what I might commonly do in 
various methods/functions. I like the idea of a compiled solution which is 
smaller and light weight verses Numpy and such. My requirements are reasonable 
performance and do not require the breadth or depth of the Numpy stack.

My code was simply copied and pasted from a playground.nim file where I explore 
and play around trying to learn and understand.

Simply compiling my code with the above nim c -r -d:release 
--passC:-march=native --passC:-ffast-math ntplayground.nim worked wonders.

My code as existing now runs in under 30 seconds. Performing better than the 
Python/Numpy code. Yay!

I am very happy that Nim properly understood performed as I had hoped.

Hopefully I will have time to learn from this thread on Sunday. Time to spend 
time with the family.

Thanks again.

Reply via email to