11
pk76
30d

The four day rewrite of my codebase did... nothing...

No improvement. No detriment.

Just nothing...

Okay then.

Comments
  • 0
    So why rewrite it?
  • 1
    @netikras to realize it does nothing
  • 1
    @netikras what I did, on paper, should have improved things; it would have in almost any codebase. It just turns out what I was working on was already so optimal it didn't matter.

    You can't know the result of something until you have done it and taken measurements.
  • 2
    Don’t kick yourself, at least you didn’t break anything. My guarantee to employers is this and only this: after I’m done, it will only be as broken as it was when I got it— no more, but hopefully less.
  • 1
    @gaffletron oh I ain't. Thing is, it means there's no more performance to be squeezed out doing what I did, so optimizations are found elsewhere. I still wound up narrowing the scope where I can make potential progress much closer to where I can make actual progress.
  • 1
    well... you found another equally valid way to solve the same problem. i'd call that a small success.
  • 0
    @Midnigh-shcode yeah, but it was also twice the SLOC, so considering it otherwise performed nearly identical, it's objectively worse.
  • 1
    @pk76 Not quite.
    1. measure BEFORE (profile)
    2. find spots where improvements could be made (reuse objects, cache in-mem, change data structure implementations, redo the logic, parallel calculations, etc.)
    3. make a dirty PoC
    4. measure AFTER
    5. compare which PoCs have made positive changes
    6. rewrite code to install those PoCs nicely

    You can make rough estimates at #2 if you know what you are doing :) Rewriting the whole thing just to test is a bad move.
  • 1
    @netikras that's basically what I did. Although amusingly if I follow what you just said to the letter it would say not to do the benefit I just got, so, I think I'll stick to what's got an above 90% success rate for me.
  • 1
    @pk76 well, whatever works for you :)
Add Comment