Skip to content

Non-recursive traversal #79

@Samuel-amap

Description

@Samuel-amap

Traversal is currently exclusively recursive.

This hasn't been a performance bottleneck so far, but given how large trees can become, it is worth profiling for large trees, especially given how deep a stack of recursive calls can go (VPalm is a prime example), to see whether anything can be gained from a non-recursive traversal.
Testing different struct data layouts might also be required to get a gain, taking into account also that a multi-scale implementation with varying attribute types might not be as straightforward depending on what operation one wishes to apply to the tree.

In any case, to illustrate, wikipedia has an example implementation of depth-first search for trees (or more general graphs) : https://en.wikipedia.org/wiki/Depth-first_search

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions