string reuse optimization for BcG (helps dict.get caching too)