fix vm overflow

I hope those are the last overflow bugs in the vm. The tests cause the client to crash with a segmentation fault, this PR fixes that.
Also included the performance tests from Artur.
the size that is to be copied. I will change the name (the name el was not given by me :-) )