message: Use C array ops instead of operator[]
  We save a pointer to an inlined vector array of op_inputs & tensor_args
  in order to avoid the overhead of invoking InlinedVector::operator[].
diff: @@ -24,11 +24,16 @@ Status ExecuteNodeArgs::Init(
  // overwritten during kernel execution. The reference count is incremented
  // below when we insert a copy of the Tensor into protected_tensors, and will
  // be decremented once execution is complete.
  - int first_index_that_needs_protecting = -1;
  - for (int i = 0; i < op_inputs.size(); ++i) {
  - TensorHandle* in = op_inputs[i];
  + const int n_inputs = op_inputs.size();
  + gtl::InlinedVector<TensorValue, 4> input_vector(n_inputs);
  + int first_index_that_needs_protecting = -1; // Used to avoid second loop
  + if (n_inputs > 0) {
  + TensorHandle* const* op_inputs_array = &op_inputs[0];
  + TensorValue* tensor_args_array = &tensor_args_[0];
  + for (int i = 0; i < n_inputs; ++i) {
  + TensorHandle* in = op_inputs_array[i];
  if (!in->IsRemote()) {
  - TF_RETURN_IF_ERROR(in->TensorValue(&tensor_args_[i]));
  + TF_RETURN_IF_ERROR(in->TensorValue(&tensor_args_array[i]));
  if (first_index_that_needs_protecting < 0 && !in->RefCountIsOne()) {
  first_index_that_needs_protecting = i;
  }
  @@ -40,15 +45,16 @@ Status ExecuteNodeArgs::Init(
  }
  if (first_index_that_needs_protecting >= 0) {
  - for (int i = first_index_that_needs_protecting; i < op_inputs.size(); ++i) {
  - TensorHandle* in = op_inputs[i];
  + for (int i = first_index_that_needs_protecting; i < n_inputs; ++i) {
  + TensorHandle* in = op_inputs_array[i];
  if (!in->IsRemote() && !in->RefCountIsOne()) {
  const Tensor* input_tensor = nullptr;
  - TF_RETURN_IF_ERROR(op_inputs[i]->Tensor(&input_tensor));
  + TF_RETURN_IF_ERROR(op_inputs_array[i]->Tensor(&input_tensor));
  protected_tensors_.emplace_back(TensorReference(*input_tensor));
  }
  }
  }
  + }
  if (has_remote_inputs_) {
  #if defined(IS_MOBILE_PLATFORM)
  