Thank you very much for sharing this interesting approach! I can't wait trying it. And:
... running it on a Linux machine I was able to do it using 400Kb of memory instead of 4Gb.
Yes - this is a good point and important to mention! I always advocate Linux.