arnaud.giuliani
03/01/2024, 8:19 AMLeoColman
03/02/2024, 7:14 PMtailrec
LeoColman
03/02/2024, 7:15 PMflatten
is very well defined recursively, and adding extra allocations explicitly clutters the code and makes it less readable than the recursive versionLeoColman
03/02/2024, 7:15 PMMarcello Galhardo
03/04/2024, 11:41 AMMarcello Galhardo
03/04/2024, 11:52 AMtailrec
or a iterative approach, for such a simple self-contianed and “by the book” BFS, my opinion is that these implementation details are irrelevant; I would avoid entering the realm of bike-shedding here.
Also, the fact we are basically rolling back to the original flatten
implementation due to performance issues is a strong statement we don’t need to over complicate.
Of course, we can always do improvements and change to another approach if the need appears.arnaud.giuliani
03/04/2024, 6:24 PMarnaud.giuliani
03/04/2024, 6:24 PM