Skip to content

ClinchedDBValues class #304

Description

@yakra
  • C++: Clinched values are constructed, then copied and moved:
    • Copied when passed to the add function by value
    • Moved when we push_back onto the value containers
  • Instead, pass the add functions the args by which to construct, and emplace_back.
    Or not. We'd still construct the string via the + operator, and move it to the container.
    • Why not just pass the strings to add_cfoo as an rvalue reference.
  • Consider using pointers, to cut down on copy operations when resizing the vector.
    Or not. It's move instructions that are involved here, which are already very low cost (as I see from my attempts to store args rather than strings). Pointers would just be more trouble than they're worth.
  • Longer term, look into storing the args themselves, not full strings, and saving RAM.
    • How much RAM does this whole structure take up anyway?
    • Could a similar arrangement also benefit Python slightly? Would need to rewrite as a class; it's just 3 lists currently. A pretty simple task though.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions