Reuse WorkerInterface objects. Reduces the number of allocations in
a benchmark from ~91M for ~81M.
There are future cleanups possible but not yet done:
(a) Disallow direct destruction of WorkerInterface and always release
back to a cache of WorkerInterface objects.
(b) Replace channel cache with just a factory that knows how to create
a WorkerInterface and leave caching to the higher-level cache
of WorkerInterface objects.
Change: 127435209
Loading
Please sign in to comment