Notices
Results 1 to 2 of 2

Thread: difference between switch statement and vector table compilation

  1. #1 difference between switch statement and vector table compilation 
    Forum Freshman
    Join Date
    Sep 2013
    Posts
    67
    Can jump really happen , or is it just action of processing not taking place at that code line , while passing on the same root/way.

    say :
    1 2 3 4 5

    if pointers in 1 , want to it to be in 4 .
    how does it happen :

    will it straight appear in 5,
    or walk through 2 ,3 ,4 and ignoring them .

    Serial way of processing (??)
    Can parallel way of processing be achieved here (mesh topology !!!??? i doubt)


    Reply With Quote  
     

  2.  
     

  3. #2  
    Brassica oleracea Strange's Avatar
    Join Date
    Oct 2011
    Location
    喫茶店
    Posts
    16,670
    I'm not sure I fully understand your question. A switch statement can be compiled into several different forms, depending on what the compiler knows about the conditions and the code to be executed.

    For example, a switch with only a small number of conditions might be compiled into the equivalent if...then...else... structure, using conditional branches. In some cases, the compiler can use the condition values to directly calculate the address to branch to. If not, then a vector table might be used.


    Without wishing to overstate my case, everything in the observable universe definitely has its origins in Northamptonshire -- Alan Moore
    Reply With Quote  
     

Similar Threads

  1. help with toggle switch
    By fine in forum Electrical and Electronics
    Replies: 8
    Last Post: June 14th, 2013, 02:49 PM
  2. Compilation of latest science news links
    By brane wave in forum Links
    Replies: 2
    Last Post: November 9th, 2011, 12:13 PM
  3. constant compilation
    By saul in forum Mathematics
    Replies: 2
    Last Post: November 4th, 2010, 09:32 PM
  4. CERN LHC switch on - when?
    By mrbean in forum Physics
    Replies: 18
    Last Post: July 24th, 2008, 03:30 AM
Bookmarks
Bookmarks
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •