Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: When should I use a dispatch table?

by chromatic (Archbishop)
on Dec 01, 2006 at 01:28 UTC ( #587100=note: print w/ replies, xml ) Need Help??


in reply to Re^2: When should I use a dispatch table?
in thread When should I use a dispatch table?

In mumble years of programming, I can't think of a single example where the overhead of a dispatch table versus cascading conditionals made a whit of difference compared to the cost of performing IO. Therefore, unless I ever write a FFT or a petabyte-Ethernet driver, I don't see much point to worrying about a handful of milliseconds of difference between two constructs where one is so much more maintainable than the other.

Then again, almost every program I've ever written performs some sort of IO somewhere.

As it's the holidays, can I wish that Benchmark refused to give meaningful results for syntax questions and only helped profile various algorithms?


Comment on Re^3: When should I use a dispatch table?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://587100]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2014-07-11 00:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (217 votes), past polls