this is a talk i think every clojure developer should watch. it's just a matter of time before you run into classic mistakes like holding onto the head of a lazy sequence or doing the sort of lock-stepping the speaker talks about. and it can take a surprising amount of time to understand why your code is behaving the way that it is until you run this sort of gauntlet and begin to understand what to look for, which this talk demonstrates. clojure's collection functions are so easy to use that you can find yourself in a position where you realize you never really thought about how they work until you're in a high perf situation like the speaker. for example, regular sequences (been a while since i used clojure) are realized in chunks which comes at a surprise when your code expects items to get realized one at a time. there's just a lot of depth behind seemingly straightforward, minimal-looking code. and i think this is clojure's blessing but also its curse. for instance, look at Devon's before and after snippets and ask yourself if you would be able to identify the runtime distinction without running them. i think Devon said this was his first talk? it was very simply presented, and only highlighting the relevant bits of the code made it very easy to follow.
At th-cam.com/video/VC_MTD68erY/w-d-xo.html, I see an fnil inside the reduce. You can get a boost by extracting that and def'ing a var to the result of fnil. That way you won't be creating new functions on every message.
this is a talk i think every clojure developer should watch. it's just a matter of time before you run into classic mistakes like holding onto the head of a lazy sequence or doing the sort of lock-stepping the speaker talks about. and it can take a surprising amount of time to understand why your code is behaving the way that it is until you run this sort of gauntlet and begin to understand what to look for, which this talk demonstrates.
clojure's collection functions are so easy to use that you can find yourself in a position where you realize you never really thought about how they work until you're in a high perf situation like the speaker. for example, regular sequences (been a while since i used clojure) are realized in chunks which comes at a surprise when your code expects items to get realized one at a time. there's just a lot of depth behind seemingly straightforward, minimal-looking code. and i think this is clojure's blessing but also its curse. for instance, look at Devon's before and after snippets and ask yourself if you would be able to identify the runtime distinction without running them.
i think Devon said this was his first talk? it was very simply presented, and only highlighting the relevant bits of the code made it very easy to follow.
wow, really great talk. Thanks!
At th-cam.com/video/VC_MTD68erY/w-d-xo.html, I see an fnil inside the reduce. You can get a boost by extracting that and def'ing a var to the result of fnil. That way you won't be creating new functions on every message.