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

Optimize EdgeSet data structure:

1. Extend the inlined part to use an entire cacheline.
2. Switch from std::set to gtl::FlatSet (absl::flat_hash_set breaks the android build), which uses less memory, causes less memory fragmentation and is faster.

This speeds up edge iteration on large nodes by up to 80%.
This speeds up GraphDef->Graph conversion by up to 44%.
Saves about 20% of memory for nodes that spill over the inlined set.

PiperOrigin-RevId: 219508843
parent 9dac4d7b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment