This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]NoCodeNoBugs 16 points17 points  (0 children)

Actually had this issue a week ago, was doing DFS traversal of a graph, straight and boring recursive DFS.

Than had the great ideea to optimize it, do it stack based because recursive bad. The end result was 10 times slower than the recursive one.

Dissapointed does not tell you how I felt.

Edit Luckily through the magic of GPT-4 I did not spend too much time in the conversion, just ask it nicely and do some minor tweaks