
22 Jan
2010
22 Jan
'10
1:33 p.m.
Thanks for your help Stephen and Daniel. The interpreter now doesn't show any stackoverflows anymore. By using the profiler, I identified some problems. The State Monad seemed to cause a memory leak. It also made the interpreter run slow. I removed it, because it isn't neccesary. I also used Immutable Arrays to store the instructions in, which seemed to speed it also up. I made the code more functional and the evaluation loop tail-recursive, which helped a lot. I am now testing different storage models for the data tape. I now use Data.Map, but Data.Zipper.List maybe more appropiate. I didn't know about the profiler and I am suprised it is such a big help. I never used one before. Best Wishes, Edgar