use reference instead
Merge pull request #7187 from minggo/performance-improve

use reference instead