Click here to Skip to main content
15,889,345 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: bizarro land coding Pin
honey the codewitch3-Jan-21 9:05
mvahoney the codewitch3-Jan-21 9:05 
GeneralRe: bizarro land coding Pin
Randor 3-Jan-21 9:40
professional Randor 3-Jan-21 9:40 
GeneralRe: bizarro land coding Pin
honey the codewitch3-Jan-21 10:53
mvahoney the codewitch3-Jan-21 10:53 
GeneralRe: bizarro land coding Pin
Greg Utas3-Jan-21 10:13
professionalGreg Utas3-Jan-21 10:13 
GeneralRe: bizarro land coding Pin
Stuart Dootson4-Jan-21 0:44
professionalStuart Dootson4-Jan-21 0:44 
GeneralRe: bizarro land coding Pin
honey the codewitch4-Jan-21 2:51
mvahoney the codewitch4-Jan-21 2:51 
GeneralRe: bizarro land coding Pin
Stuart Dootson4-Jan-21 6:49
professionalStuart Dootson4-Jan-21 6:49 
GeneralRe: bizarro land coding Pin
honey the codewitch4-Jan-21 7:05
mvahoney the codewitch4-Jan-21 7:05 
I mean, to me that's still a jump table, just with two entries - one of which falls through. I wonder how the compiler would generate code for more cases?

Admittedly, I'm using the term maybe loosely, as I tend to think very abstractly, so if something feels like a jump table then i have no problem calling it that.

My point in making the distinction anyway, is my comment to Greg Utas i was making the distinction between code like this (whether an actual "jump table" or just two possibilities) nd what i was initially talking about, which is enabling branch prediction - a different animal. i don't think likely and unlikely directly impact branch prediction (although they likely do indirectly) - they affect the order the jumps come in, as your code basically demonstrates.

Adding, I probably should have said jump order, and part of the reason i didn't is i first learned about it in the context of switch/case
Real programmers use butterflies


modified 4-Jan-21 13:15pm.

GeneralRe: bizarro land coding Pin
Randor 4-Jan-21 19:51
professional Randor 4-Jan-21 19:51 
GeneralRe: bizarro land coding Pin
honey the codewitch4-Jan-21 23:45
mvahoney the codewitch4-Jan-21 23:45 
GeneralRe: bizarro land coding Pin
Randor 5-Jan-21 0:18
professional Randor 5-Jan-21 0:18 
GeneralRe: bizarro land coding Pin
honey the codewitch5-Jan-21 0:21
mvahoney the codewitch5-Jan-21 0:21 
GeneralRe: bizarro land coding Pin
Randor 5-Jan-21 0:35
professional Randor 5-Jan-21 0:35 
GeneralRe: bizarro land coding Pin
honey the codewitch5-Jan-21 0:45
mvahoney the codewitch5-Jan-21 0:45 
QuestionRe: bizarro land coding Pin
Randor 5-Jan-21 0:56
professional Randor 5-Jan-21 0:56 
AnswerRe: bizarro land coding Pin
honey the codewitch5-Jan-21 1:06
mvahoney the codewitch5-Jan-21 1:06 
GeneralRe: bizarro land coding Pin
Randor 5-Jan-21 1:24
professional Randor 5-Jan-21 1:24 
GeneralRe: bizarro land coding Pin
honey the codewitch5-Jan-21 1:35
mvahoney the codewitch5-Jan-21 1:35 
GeneralRe: bizarro land coding Pin
Randor 4-Jan-21 19:37
professional Randor 4-Jan-21 19:37 
GeneralRe: bizarro land coding Pin
honey the codewitch4-Jan-21 23:39
mvahoney the codewitch4-Jan-21 23:39 
GeneralRe: bizarro land coding Pin
honey the codewitch4-Jan-21 7:14
mvahoney the codewitch4-Jan-21 7:14 
GeneralRe: bizarro land coding Pin
Rick York3-Jan-21 11:34
mveRick York3-Jan-21 11:34 
GeneralRe: bizarro land coding Pin
honey the codewitch3-Jan-21 11:59
mvahoney the codewitch3-Jan-21 11:59 
GeneralRe: bizarro land coding Pin
Greg Utas3-Jan-21 12:39
professionalGreg Utas3-Jan-21 12:39 
GeneralFace Recognition App Pin
Kevin Marois3-Jan-21 7:59
professionalKevin Marois3-Jan-21 7:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.