Optimization for Value
Merge pull request #6535 from dumganhar/value-optimize

closed #5099: Optimization for Value