this post was submitted on 08 Jun 2025
174 points (98.9% liked)

Programming

21400 readers
79 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
top 10 comments
sorted by: hot top controversial new old
[–] Gxost@lemmy.world 40 points 4 weeks ago

Nah, I was excited to read about the algorithmic change, but it turned out to be an obvious change. I would replace nested loops with a map too. The result is impressive, though.

[–] fodor@lemmy.zip 29 points 4 weeks ago

How cool! This is one great point of FOSS.

[–] manxu@piefed.social 9 points 4 weeks ago (3 children)

we traced the issue to a 15-year-old Git function with O(N²) complexity and fixed it with an algorithmic change, reducing backup times exponentially.

I feel like there is something wrong with this sentence.

[–] _taem@discuss.tchncs.de 13 points 4 weeks ago (1 children)

I'm not a native speaker, but would agree that it sounds imprecise. To my understanding, that's a polynomial reduction of the time (O(n^2) to O(n): quadratic to linear) and not an exponential speed-up (O(2^n) to O(n): exponential to linear). 🤷 Colloquially, "exponentially" seems to be used synonymously to "tremendously" or similar.

[–] Giooschi@lemmy.world 5 points 4 weeks ago

and not an exponential speed-up (O(2^n) to O(n): exponential to linear)

Note that you can also have an exponential speed-up when going from O(n) (or O(n^2) or other polynomial complexities) to O(log n). Of course that didn't happen in this case.

[–] Deebster@infosec.pub 11 points 4 weeks ago* (last edited 4 weeks ago) (1 children)

Seem ok to me, both in grammar and what it's saying about the change. O(N²) to O(N) would be an exponential drop (2 down to 1, in fact).

[–] Giooschi@lemmy.world 5 points 4 weeks ago

An "exponential drop" would be a drop that follow an exponential curve, but this doesn't. What you mean is a "drop in the exponent", which however doesn't sound as nice.

[–] FizzyOrange@programming.dev 5 points 4 weeks ago

There isn't. This is the colloquial use of "exponentially" which is very obvious from the context.

[–] Beacon@fedia.io 8 points 4 weeks ago
[–] arty@feddit.org 7 points 4 weeks ago

Interesting how it had to get to 48 hours before someone pulled out a profiler