Merge pull request #50 from whitglint/master

Add C++ wrapper.
use while instead of for loop to simplify execution
use while instead of for
Add run-benchmark script
parameter optimization
update benchmark
refactoring matchl function
simplify functions to macro