3 ms·
> Your datastructure is never going to be more than 10-100 deep. Don't worry about it. Just write the most legible recursive algorithm, not the most performant.
by tathougies 8y ago
> Your datastructure is never going to be more than 10-100 deep. Don't worry about it. Just write the most legible recursive algorithm, not the most performant.
What? Try computing the 1000th fibonacci number.
- deleted 8y ago[deleted]
- chopin 8y agoI agree as it is important to know your boundaries. But I also like the GP prefer legible over performant code whenever it is obvious that I am not going to need more performance. In almost all cases I encountered the necessity to optimize code the reason was I/O bound. I don't recall any instance of algorithmic performance being a problem.
- tathougies 8y agoTco has little to do with timing performance and all to do with keeping code legible in functional languages.
- dnautics 8y agoIn FP that implements actor model, for example, you will be in a world of hurt if you don't TCO your actor - has nothing at all to do with legibility.