Avoid unnecessary allocations/calls
Merge pull request #17487 from pabloh/avoid_allocations

Avoid unnecessary allocations and method calls