add new memuPattern calculation method. Need performance comparison.