> Nim uses half of the memory That is strange.
You do both of your tests with 32 bit OS, or both with 64 bit OS? One more remark: You used int32 and float32 data types in your Nim version -- that seems to answer my initial question, you have not used c2nim for code transfer. I think there is a good reason why Araq invented cint and cfloat, so why not use them? And generally, I would recomment using c2nim, it mostly works even for C++ sources. After using c2nim I generally still do a line by line compare manually, but it prevents me from typing errors, and from much stupid typing.