[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
Loading
Please sign in to comment