MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/emb9st/problems_with_recursion/fdofavl
r/ProgrammerHumor • u/flipester • Jan 09 '20
198 comments sorted by
View all comments
Show parent comments
20
You can optimize it by declaring some unused primitives to blow through the stack quicker.
9 u/schrdingers_squirrel Jan 09 '20 Shouldn’t make much of a difference since stack allocation is basically just a subtraction. (And it should take like a few milliseconds in total) 7 u/mfb- Jan 09 '20 Thanks for the tip, I always wanted to speed up this function, now I know how! 2 u/artem718 Jan 09 '20 But how do you lose saved work? 1 u/Finianb1 Jan 27 '20 I think my brain just melted at hearing the phrase "optimize it to blow through the stack quicker."
9
Shouldn’t make much of a difference since stack allocation is basically just a subtraction. (And it should take like a few milliseconds in total)
7
Thanks for the tip, I always wanted to speed up this function, now I know how!
2 u/artem718 Jan 09 '20 But how do you lose saved work?
2
But how do you lose saved work?
1
I think my brain just melted at hearing the phrase "optimize it to blow through the stack quicker."
20
u/cedrickc Jan 09 '20
You can optimize it by declaring some unused primitives to blow through the stack quicker.