Homec4science

Reduce the number of strcmp calling while initialization

Authored by Takuto Ikuta <tikuta@google.com> on Jun 12 2018, 11:06.

Description

Reduce the number of strcmp calling while initialization

When we do parallel test execution with a process for a test,
initialization of gtest become performance bottleneck when the test
binary contains many testcases.

Especially, some parameterlized test in chromium browser affected by
largely when address sanitizer is enabled.
Address sanitizer does not allow using optimized strcmp function and
test addition in parameterized test require lookup of test case using
strcmp.

This patch reduces the number of strcmp, it is called when registering
parameterized test. Using reverse iterator improves the time to find
registered tests in such case.

Some tests for chromium browser using address sanitizer finished 2x
faster with this patch.

Details

Committed
Takuto Ikuta <tikuta@google.com>Jun 12 2018, 22:53
Pushed
trottetDec 4 2019, 13:52
Parents
R9484:1bccd6f353bd: Merge pull request #1625 from gennadiycivil/master
Branches
Unknown
Tags
Unknown

Event Timeline

Takuto Ikuta <tikuta@google.com> committed R9484:f4d0631a3970: Reduce the number of strcmp calling while initialization (authored by Takuto Ikuta <tikuta@google.com>).Jun 12 2018, 22:53