Homec4science

Speed up printing of characters which need hex escaping

Authored by Brian Silverman <brian@peloton-tech.com> on Jul 20 2016, 01:44.

Description

Speed up printing of characters which need hex escaping

This change speeds up the runtime of a value-parameterized test I have
which has lots of values with large strings full of unprintable
characters by 2x. I profiled it and traced most of the slowness during
googletest startup down to the way String::FormatHexInt was creating and
destroyed a stringstream for each character in the string for each
value.

Details

Committed
Brian Silverman <brian@peloton-tech.com>Aug 28 2017, 22:00
Pushed
trottetDec 4 2019, 13:52
Parents
R9484:b43bfcf49166: Merge pull request #1222 from KindDragon/vs-projects-fix3
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Silverman <brian@peloton-tech.com> committed R9484:4d26df729c41: Speed up printing of characters which need hex escaping (authored by Brian Silverman <brian@peloton-tech.com>).Aug 28 2017, 22:00