The code allocate only 432 bytes on my computer once I removed all global variables, and it's pretty fast.
Multiplying by the inverse of dx2 ... instead of dividing also make quite a difference, 2-3x. http://pastebin.com/PSZyLXJX
The code allocate only 432 bytes on my computer once I removed all global variables, and it's pretty fast.
Multiplying by the inverse of dx2 ... instead of dividing also make quite a difference, 2-3x. http://pastebin.com/PSZyLXJX