VM^2: regained speed of previous solution with new kinds of optimizations