Tree traversal can be slow sometimes. Ses how I can improve it for large MTGs.
[x] remove node type as it is not type stable
[x] remove all typeof(something) that can be replaced by the parameters of the input type
[x] Is isnothing faster than isdefined for parent()? Removed it completely as it was not needed (see f2a443f).
[x] Is default tree traversal from AbstractTrees faster? No, in an example, it did 6.192 μs (383 allocations: 8.98 KiB) against 6.938 μs (18 allocations: 1.30 KiB) with our implementation. We keep ours.
Tree traversal can be slow sometimes. Ses how I can improve it for large MTGs.
typeof(something)
that can be replaced by the parameters of the input typeisnothing
faster thanisdefined
forparent()
? Removed it completely as it was not needed (see f2a443f).AbstractTrees
faster? No, in an example, it did 6.192 μs (383 allocations: 8.98 KiB) against 6.938 μs (18 allocations: 1.30 KiB) with our implementation. We keep ours.