unrolling loops is efficient, right? ( lemmy.max-p.me )
saw a 2nd year CS guy run a maze solver (for final exam) with 300 nested if-statements. worked about 50% of the time. so he added another 5000 nested ifs and got it up to 90%. good enough!
![](https://kbin.cafe/media/cache/resolve/entry_thumb/d0/b9/d0b976a0205ea0c36959073512726e878fe7039c7f2c276470f793f644c146d0.png)
saw a 2nd year CS guy run a maze solver (for final exam) with 300 nested if-statements. worked about 50% of the time. so he added another 5000 nested ifs and got it up to 90%. good enough!
Explanation: it’s mostly due to how js does type conversion. for the Ls, it’s...
As title
cross-posted from: programming.dev/post/536596...