Performance improvement, merge not needed when modify local value

* also added perf test for gcounter
Merge pull request #36 from patriknw/wip-perf2-patriknw

Performance improvement, merge not needed when modify local value