fix performance on c++11