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

fix: use std::shared_ptr instead of std::unique_ptr for shared ressource, use operator[] instead of find_field #11

Merged

Conversation

lemire
Copy link
Collaborator

@lemire lemire commented Apr 24, 2024

  • In simdjson, we can use find_field or find_field_unordered. The operator[] is mapped to find_field_unordered. The find_field is fine, but it is used when you know the order of the keys, which is more appropriate for private JSON uses.
  • I feel uneasy about having one std:: unique_ptr that gets passed as a pointer. To me, it suggests that std:: shared_ptr is more appropriate.
  • The reset call on the object is fine.
  • I have avoided some temporary std::string instances although it is probably not significant.

@lemire lemire merged commit 92dacf0 into anonrig:rewrite-task-runner-in-cpp Apr 24, 2024
19 of 23 checks passed
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