3 ms·
I don’t know/use python. But I assume that it has hasmaps and vectors that are backed by something performant and possibly JITed? The table driven, static disp
by dgb23 4y ago
I don’t know/use python. But I assume that it has hasmaps and vectors that are backed by something performant and possibly JITed?
The table driven, static dispatch approach Muratori isn’t necessarily “hard coded” in the general case. It’s just data driven, or table driven as he puts it. It’s not less flexible as you can easier add (append!) new cases.
In fact it reminds me of how I do it in higher level languages like JS and Clojure.
Of course we’re paying a substantial performance tax when using higher level, dynamic languages. We’re paying that tax in order to get very tangible benefits.
But we can still program in a way that is data oriented, simple and easy to work with by the compiler and runtime (JIT).