use reference instead
Merge pull request #7190 from minggo/perf-improve

use reference instead