Skip to content

specialize depth 0/1 transitions, min span size 2 #3

Description

@WardBrian

Copying from bob-carpenter/walnuts#19

https://github.com/flatironinstitute/walnuts/blob/fb09dd05fa9c654a51b4c93878e40911bebdf929/include/walnuts/walnuts.hpp#L361

For depth = 0 in transition we do not need to construct the full span we get from build_leaf. And in build_span when depth == 1 we can call build_leaf directly instead of going to 0. Both of these changes should give us a small speedup, but we should wait until the algo is more tested before doing that.

EDIT: The minimum size span we should need is two nodes---one node cannot make a U-turn. But it makes the edge cases in the code very messy, so let's put this off until we need it.

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