It does feel god like to take a method that was taking 36-72 hours and after rewriting it, it takes 2 hours. Faulty logic was causing it to perform a lot of full table scans.
especially when it wasn't your dumbass past self who made the faulty logic in the first place
I will admit, making a report go from 40 minutes to instant as a year one junior made me feel smug as shit
Optimization -> brain activation
What are you doing that a single method would take 72 hours?
Calculating the time it takes a crew to fix a power outage caused by a squirrel, that happens during a weekday that involves the late shift. It had like billions of possible combinations.
They could be done by the time that finishes, was it python?
C#, and this was to pre-calculate for the estimates, not live time
And you should feel that way.
Regardless of how you look at it, if you can and have dramatically improved the execution speed of your own code, that means that you have improved your programming skill! You are better than you were before, which is the only comparison that really matters.
Go you!
I felt like that when parsing JSON with SIMD. Felt like I just discovered fire. 8x sync speed.
Then I wasted 2 hours because I forgot to exec the prepared statement. Good times.
The secret was probably hashtables.
I feel like that when i optimize SQL queries.
Model training script optimization 🚬
Best feeling ever) even if the code still looks like spaghetti
That's how i felt making iterators to actually iterate over stuff instead of the 700+ lines of for loops scattered around the codebase all to do the same basic interations on the same type
You only get to pose like that when you make someone else's shitty script run 1000x faster.
It still crashes, but it crashes FASTER. The true guru motto 😂
My team has been rewriting some of our workflows from our ticket system’s no-code orchestration editor into python scripts, and reducing runtimes from 2ish hours down to seconds. It’s pretty exciting
By rewriting it from Python to Rust... (Don't throw rocks at me, is just reality, many tools switch from interpreted languages to Rust so they get blazing fast speed)
In my experience most of the lack of performance isn't the result of the programming language, but rather really shitty programming. As if there were some sorta competition who could create the worse complexity algorithm.
Definetily is, but still, the interpreted language requires much more CPU clocks than just compiled native code and therefore is anyway slower. Even with I/O scenarios.
setTimeout(()=>{...}, 8000) ➡️ setTimeout(()=>{...}, 8)