|
|
|
|
|
by ak217
1326 days ago
|
|
> for most applications A very subjective statement. Yes, your data matters. Also, the scale and security model/trust boundary of your application matters. Some actual problems with recursion based algorithms: * They will break unexpectedly as you scale them up. * They are not memory efficient, so you won't be able to process much in parallel if your data is non-trivial. * They can make your service trivially DoSable, so now you have to worry about either sanitizing your input or monitoring your stack instead of just timeouts/rate limits. I've lost track of the number of times I've had to tweak JVM settings, write up security issues, or just straight up tell people things won't work because an academic researcher decided to implement an algorithm with recursion, and then engineers were asked to productize it. |
|