Skip to content

Don't assume compiler memoization #3

@tcsullivan

Description

@tcsullivan

See here.

Code like below (taken from the link) calls build_node_list three times, and there's a chance this causes the compile to recompute the list with every call. There is significant compilation overhead in this project, so I wouldn't be surprised if this is the case.

auto list = build_node_list();
auto tree = std::span(new node[tree_count()] {}, tree_count());

Need to minimize recomputation, or find ways to avoid it altogether.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions