MINOR: [C++] Move static declaration to non-static declaration to improve performance#13222
Conversation
|
@ursabot please benchmark lang=R |
|
Benchmark runs are scheduled for baseline = 43a604d and contender = 9ab685a2735e8b874aec866075ce9054ab1fe6f2. Results will be available as each benchmark for each run completes. |
|
appveyor test failure may deserve deeper investigation, though unlikely related to this pr: |
|
@ursabot please benchmark lang=R |
|
Benchmark runs are scheduled for baseline = 43a604d and contender = d00b684456cb25d992b08bbbfda23f40b19f7d69. Results will be available as each benchmark for each run completes. |
d00b684 to
e28ce2a
Compare
|
Rebased and applied suggestion of using a module-private variable. |
|
@ursabot please benchmark lang=R |
|
Benchmark runs are scheduled for baseline = 01d8485 and contender = e28ce2a. Results will be available as each benchmark for each run completes. |
According to conbench there was a slight regression on #12957 . Poking around a bit it seems that a static local variable is implemented using some kind of global lock (__cxa_guard_acquire / __cxa_guard_release). On the other hand, constructing an empty shared_ptr is cheap (two pointers are set to 0). So if we care about performance here we probably don't want
static. This may be what is causing the conbench issue.