Open
Description
- The
collect
function recursivelyconcat
s on a tree, making the time complexity quadratic. This can be avoided using difference lists. - The
do_label
step builds some unnecessary intermediate trees, similar to thedfs
we had (Optimizing DFS in Data.Graph #882).
I'm not aware of common use cases for bcc
, so I'm not sure if this affects anyone.
But as long we have it, we should make it efficient.
I can send a PR.