5 ms·
yes, but the intention behind that is to have control and knowledge over the maximum time a function will take. What he is effectively saying is to treat all c
by TickleSteve 10y ago
yes, but the intention behind that is to have control and knowledge over the maximum time a function will take.
What he is effectively saying is to treat all code in the same manner as you would for a hard-real-time system.
I certainly agree with this for performance critical code (performance being overall duration or latency), but this is not a one-size-fits-all solution. There are a lot of cases where this is not appropriate.
- ajuc 10y agoIt depends if we optimize for thtoughput or latency.
- TickleSteve 10y ago(I mentioned overall duration or latency which covers your point). but those two cases are the same.... they're both performance-critical code. Not all code is.
- ajuc 10y agoI would argue in this context "optimize running time" is different while "optimize latency" and "don't care about performance" are similar. I mean - if you don't care about total running time it makes sense to remove special cases that don't change the worst case because of readibility/bugs, no matter if you care about latency.