covert all method to function
fix issue and speed test
remove speediest code,
result

before performance tune
over 1000000 runs avg time about 5.079813 sec

after performance tune
over 1000000 runs avg time about 4.671727 sec