You could generate C from your numeric file format, then use the dynlib module 
in nim to load it during runtime. That is to say, replace C++ with nim, but 
don't bother with nim's format when generating code, since it's easier to 
generate C/ASM for your specific needs. I find "hard C" like that, for well 
defined, specialized transformations of numeric data, to be very unlikely to 
require any shenanigans that might result in stack smashing, undefined states, 
or race conditions. Using nim everywhere else where those shenanigans would be 
required in spades? Still a good idea.

But I've never really done much with fourier transforms, so I dunno. Have you 
looked at the standardized fftw library at 
[http://www.fftw.org](http://www.fftw.org) ? They have a "fftw-wisdom" command 
for doing some sort of compilation/optimization beforehand.

Reply via email to