Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
oneeyedpigeon
· 7y ago · 0 comments
I put in a value of 500, and while it didn't freeze completely, it really struggled to respond.
Comments
[–]
davidim
7y ago
Recursive division may be elegant, but it seems that may also have its disadvantages.
[–]
wakamoleguy
7y ago
One trick you could use is to add a setTimeout or asnyc/await somewhere during the recursion. By forcing a step to be asynchronous, the stack count will be reset.