in reply to Re: When should I use a dispatch table?
in thread When should I use a dispatch table?
Don't blame the hash lookup performance here.
I didn't. To quote myself from the very next sentence: The hash does have the overhead of looking up the key, dereferencing the value, and executing the code ref. I knew that subroutine overhead is expensive - I even wrote a node inquiring into optimizing them a few years ago: (Inline subs?).
I am glad you replied and allocated the majority of the performance hit to the correct culprit. Unfortunately, typical dispatch tables use code refs. I hear lots of good things about bleed perl so hopefully 5.10 will be released soon.