Click here to Skip to main content
14,841,837 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 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 
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 
honey the codewitch wrote:
That's sort of unfortunate though, because there are many cases in a codepath where an if will be evaluated most often true with one use case, and most often false
I mean... some of this is just common sense. Imagine that you have a switch statement with 100 cases. 99 of those cases occur 0.1% of the time, the other case occurs 99.9% of the time. In the old days (on old hardware before pipelining and branch prediction) we had to remember to optimize our switch statements so the most common case is at the top.

It's not as relevant today because the address of the most used case will most likely be present in the instruction pipeline. In fact it will have probably already been fetched and speculatively executed.
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
mvaGreg Utas3-Jan-21 12:39 
GeneralFace Recognition App Pin
Kevin Marois3-Jan-21 7:59
professionalKevin Marois3-Jan-21 7:59 
GeneralRe: Face Recognition App Pin
Nelek3-Jan-21 10:15
protectorNelek3-Jan-21 10:15 
GeneralLocal Polymorphism Pin
Gerry Schmitz3-Jan-21 4:50
mveGerry Schmitz3-Jan-21 4:50 
GeneralRe: Local Polymorphism Pin
PIEBALDconsult3-Jan-21 5:28
professionalPIEBALDconsult3-Jan-21 5:28 
GeneralRe: Local Polymorphism Pin
Daniel Pfeffer3-Jan-21 6:07
professionalDaniel Pfeffer3-Jan-21 6:07 
GeneralRe: Local Polymorphism Pin
OriginalGriff3-Jan-21 7:38
mveOriginalGriff3-Jan-21 7:38 

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.