Label:remove unused code and optimization performance.

1.remove unused code
2.reduce calculation amount.
3.reduces expenses of function calls