Commit 8e8b9356 authored by Derek Murray's avatar Derek Murray Committed by TensorFlower Gardener
Browse files

[tf.data] Call `Env::NowNanos()` less often in performance modeling code.

This approximately cuts the number of calls to `clock_gettime()` (or
equivalent) in half.

This improves the performance of the `Dataset.range()` benchmark with
and without modeling enabled:

* Average time per element (with modeling): 441.004515
  (was 498.648620 nanoseconds)

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