4 ms·
As the other answers note, multiple dispatch is largely a performance improvement. When writing Python, performance has usually been sidelined as a priority in
by musingsole 6y ago
As the other answers note, multiple dispatch is largely a performance improvement. When writing Python, performance has usually been sidelined as a priority in the first place (within some constraints).
Personally, I hate this presentation. Multiple dispatch (to me) is cognitively heavier and not what I would default to. If it's a performance gain and I need performance, then sure. But too often people hold it up as a virtue because the need for speed is assumed.
- amkkma 6y agoWhat? I used to write python, and to me, MD is first and foremost a conceptual improvement. Makes writing code so much sweeter, more expressive and sensical. It also heavily improves composability. It's LESS performant if not done carefully. Certainly FastAI, Matt rocklin etc didn't reimplement a subset in python just to get slower code See https://youtu.be/kc9HwsxE1OY https://youtu.be/kc9HwsxE1OY
- DNF2 6y agoI agree, the performance is a very nice bonus, but it is primarily about expressiveness, composability and natural simplicity. It just seems profoundly un-natural and arbitrary to limit dispatch to only the first argument.