MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/abi4hd/deleted_by_user/ed2c4on/?context=3
r/badcode • u/[deleted] • Jan 01 '19
[removed]
87 comments sorted by
View all comments
Show parent comment
2
I'm pretty sure using recursion to go through elements of an array is pretty inefficient
2 u/Tynach Jan 02 '19 Just depends on how the compiler optimizes it. If you have tail-call optimization, you can write recursive code that gets compiled into a loop. 1 u/MoldyWolf Jan 02 '19 Oh yeah I see what you're saying
Just depends on how the compiler optimizes it. If you have tail-call optimization, you can write recursive code that gets compiled into a loop.
1 u/MoldyWolf Jan 02 '19 Oh yeah I see what you're saying
1
Oh yeah I see what you're saying
View all comments
Show parent comment
2
u/MoldyWolf Jan 02 '19
I'm pretty sure using recursion to go through elements of an array is pretty inefficient