A switch statement , Computer Engineering

Which is more efficient, a switch statement or an if else chain?

Ans) The differences, if any, are likely to be small. The switch statement was designed to be efficiently implementable, though the compiler may want to use the equal of an if/else chain (as opposed to a compact jump table) if the case labels are sparsely distributed.

 

 

Posted Date: 4/8/2013 3:12:34 AM | Location : United States







Related Discussions:- A switch statement , Assignment Help, Ask Question on A switch statement , Get Answer, Expert's Help, A switch statement Discussions

Write discussion on A switch statement
Your posts are moderated
Related Questions
What is SAP LUW or Update Transaction? Update transaction (or "SAP LUW") This is a set of updates terminated by an ABAP/4 commit.  A SAP LUW may last much longer than a data

What is the Analysis Techniques Object Modelling Object modelling is very significant for any object oriented development, object modelling shows static data structure of real

solution for oadovan string inc language

what is initial interval and latency in a functional unit(fp) of a pipeline

Q. Analysts in various functional areas? Today systems analyst's job presents a exciting and fascinating challenge. It provides high management visibility and opportunities for

Visualization Visualization is a general method in contract to search based tools.  In this method visual aids are given like pictures to assist the programmer in evaluating th

What are the elements of Analysis model? i. Data Dictionary ii. Entity Relationship Diagram iii. Data Flow Diagram iv. State Transition Diagram v. Control Specifica

What is the significance of the screen number '0'? In "calling mode", the special screen number 0 (LEAVE TO SCREEN 0) causes the system to jump back to the last call level.  Th

Q. Define General Purpose Register Architecture? General Purpose Register (GPR) Architecture: A register is a word of internal memory similar to the accumulator. GPR architec

Question: (a) Give three typical uses of Web Services. (b) Describe the term WebService Behavior and list its advantages. (c) Explain how Proxy classes are used to acc