Skip to content

fix: remove another instance where we copy#14

Merged
FranciscoThiesen merged 1 commit intofast_prototypefrom
avoid_copies
May 27, 2024
Merged

fix: remove another instance where we copy#14
FranciscoThiesen merged 1 commit intofast_prototypefrom
avoid_copies

Conversation

@lemire
Copy link
Member

@lemire lemire commented May 26, 2024

The struct_to_tuple effectively creates a temporary copy of the struct, which means copying the strings in particular. Using references instead is better.

Numbers:

Screenshot 2024-05-26 at 12 27 55 PM

This is still not what we would like. What we should try to do is to avoid the construction of a tuple entirely at runtime. I'll open an issue.

@FranciscoThiesen
Copy link
Member

Nice catch!

@FranciscoThiesen FranciscoThiesen merged commit 62d7d96 into fast_prototype May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants