>Looking at some code from a third party library we're using that allows the user to place widgets anywhere on the screen
>trying to figure out why it's so slow
>look at source file that computes if widgets overlap each other
>"simple rectangle intersection, what could go wron-"
>it generates a list of every single point the widget occupies on the screen and computes intersection by iterating over the lists of each widget to see if any of them have the same points
>it does this on every redraw
Oh my 🍯 I can't take this shit no mo pls no more code written by Indians please !!!
Witerawwy using a O(n^2) algorithm when there's a K algorithm available
Mfw (my face when)
I meant O(1), back in college I had a professor that used K for an algorithm that completes in constant time. Or maybe I'm confusing that with a different K, it's been a while since I was in school.