apply new antma optimizations to WMMatching
apply new antma optimizations to WMMatching

from https://github.com/antma/scala-tools/blob/master/src/main/WMMatching.scala

luanlv/lila,arex1337/lila,arex1337/lila,luanlv/lila,luanlv/lila,arex1337/lila,arex1337/lila,luanlv/lila,arex1337/lila,arex1337/lila,arex1337/lila,luanlv/lila,luanlv/lila,luanlv/lila