Thank you very much Tim. I am using the profiler and your package ProfileView quite extensively and I know where is my Achille heel in the code, and it is cpu bound. That's why I am so puzzled with threads.
I will try to use @code_warntype, never use it before. Best wishes, Tomas