[tf.data] Avoid copying `std::shared_ptr<model::Model>` on hot paths.
This improves the performance of the `Dataset.range()` benchmark with and without modeling enabled: * Average time per element (without modeling): 110.381937 nanoseconds (was 124.318142 nanoseconds) * Average time per element (with modeling): 498.648620 nanoseconds (was 584.610391 nanoseconds) PiperOrigin-RevId: 220680272
Loading
Please sign in to comment