Descriptionmake debug mode ~20% faster on linux
I was doing some benchmarking on tests on linux, and noticed that 10-20% of time was
in ThreadCheckerImpl::CalledOnValidThread. I looked into it and found that we're doing
a syscall to get the thread ID, which is not needed on any platform where pthread_t
is already an integer type. Replacing that syscall with pthread_self() makes this particular
test (End2EndTest.BasicFakeSoftwareVideo) go from 488ms to 374ms, which is a 20% speedup.
While other tests might not use ThreadChecker quite as much, it should still be a pretty
good win across a large set of tests.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=272725
Patch Set 1 #Patch Set 2 : odd dcheck removed #
Total comments: 2
Patch Set 3 : Actually works now I think #Patch Set 4 : win fix #
Total comments: 6
Patch Set 5 : Comment updated #
Messages
Total messages: 14 (0 generated)
|