thrift icon indicating copy to clipboard operation
thrift copied to clipboard

THRIFT-5817: [C++] Avoid copy of TUuid

Open CJCombrink opened this issue 1 year ago • 2 comments

THRIFT-5817: [C++] Avoid copy of TUuid Make TYPE_UUID as complex for C and C++ generator

  • Generate code that does not make a copy for TUuid for C and C++
  • [x] Did you create an Apache Jira ticket? (Request account here, not required for trivial changes)
  • [x] If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"?
  • [ ] Did you squash your changes to a single commit? (not required, but preferred)
  • [ ] Did you do your best to avoid breaking changes? If one was needed, did you label the Jira ticket with "Breaking-Change"? This can be breaking, but not sure if it applies since I don't think UUID support has been released for C++
  • [ ] If your change does not involve any code, include [skip ci] anywhere in the commit message to free up build resources.

CJCombrink avatar Sep 05 '24 18:09 CJCombrink

Happy to merge into 0.21.0 but I want a second opinion here.

Jens-G avatar Sep 07 '24 10:09 Jens-G

The return value optimization to use a reference is probably a wash, since the value is going to sent through the protocol anyway. Maybe it provides a tiny memory savings.

Avoiding a copy on the input is a performance improvement and that's the one I thought would be useful.

jeking3 avatar Sep 24 '24 14:09 jeking3

@CJCombrink Could you please e.g. rebase so we have another CI run?

Jens-G avatar Mar 04 '25 20:03 Jens-G

@Jens-G Successfully rebased

CJCombrink avatar Mar 05 '25 05:03 CJCombrink