Re:Decreasing Gitlab repo backup times from 48 hours to 41 m...
by lassejansen on Friday June 06, 2025 @03:44PM
(#44204296)
Or, phrased differently, if n has an upper limit, the algorithm is O(1).
Re:Decreasing Gitlab repo backup times from 48 hours to 41 m...
by connicpu on Friday June 06, 2025 @04:11PM
(#44204534)
As long as you have tests that regularly exercise your algorithm at n=max where you would notice if they were exceptionally slow
Re:Decreasing Gitlab repo backup times from 48 hours to 41 m...
by masklinn on Friday June 06, 2025 @03:52PM
(#44204357)
> Real production use cases don't have small 'n'.
Real production use cases absolutely have small n. You don't hear about them, because it's very hard for them to cause issues. Unless the use case changes and now the n is not small anymore and nobody noticed the trap.
Re:Decreasing Gitlab repo backup times from 48 hours to 41 m...
by haiku2077 on Friday June 06, 2025 @06:45PM
(#44205792)
I have an app that's been running an O n^2 algorithm in "production" (free open source app used by various communities) for about half a year now.
It's been fine because "n" is "number of aircraft flying in this flight simulator" - and the simulator's engine starts to fail above around 2000 anyway. So even in the worst case it's still going to run within milliseconds.
That's the problem. A lot of these quadratic time algorithms don't set limits.
Even 'n!' is fine for small 'n'. Real production use cases don't have small 'n'.