Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fast pimpl idiom for our serialization classes #2001

Open
Neverlord opened this issue Feb 2, 2025 · 1 comment
Open

Use fast pimpl idiom for our serialization classes #2001

Neverlord opened this issue Feb 2, 2025 · 1 comment
Assignees
Milestone

Comments

@Neverlord
Copy link
Member

We are already using the pimpl idiom in a few places to give us more leeway for changing the implementation without breaking the ABI and to reduce compile times. However, there's a lot more classes where it would make sense to push implementation details out of the header. Of course forcing heap allocations onto all of these would be decremental to the performance. Hence, fast pimpl idiom. Isn't quite as flexible because the size of the implementation object is fixed but avoids the extra heap allocations.

The first set of classes where deploying the fast pimpl idiom makes sense are our serialization classes.

@Neverlord Neverlord added this to the 2.0.0 milestone Feb 2, 2025
@Neverlord
Copy link
Member Author

Neverlord commented Feb 2, 2025

  • config_value_writer
  • config_value_reader
  • json_builder
  • json_reader
  • json_writer
  • binary_serializer
  • binary_deserializer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants