nimAES icon indicating copy to clipboard operation
nimAES copied to clipboard

Nim 0.18.0 compilation problem

Open h3rald opened this issue 6 years ago • 1 comments

When compiling any Nim program using NimAES, a very large .c file is generated (several MBs), which takes a long time to compile, uses up a large amount of memory during compilation making it impossibly ble to compile on low-memory systems (500-1000MB of RAM) and results in bigger executables.

This can be observed even when compiling the test program in this repository.

I never encountered this behavior in previous versions of Nim. Any idea why this is happening now?

h3rald avatar Mar 08 '18 20:03 h3rald

looks like Nim optimizer become more aggresive than before. It unwind the for loop of a table initialization and turn it into large static table, hence the big file size. I don't know yet how to turn this optimizer off or turn it off for selected piece of code.

jangko avatar Mar 09 '18 07:03 jangko