Commit cf02fa25 authored by A. Unique TensorFlower's avatar A. Unique TensorFlower Committed by TensorFlower Gardener
Browse files

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
parent 9c0fd2b6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment