Click here to Skip to main content
15,897,704 members
Home / Discussions / C#
   

C#

 
QuestionWhich one is faster - Static function calls or If else? Pin
abcxyz8221-Apr-05 0:47
abcxyz8221-Apr-05 0:47 
AnswerRe: Which one is faster - Static function calls or If else? Pin
leppie21-Apr-05 0:51
leppie21-Apr-05 0:51 
GeneralRe: Which one is faster - Static function calls or If else? Pin
abcxyz8221-Apr-05 1:08
abcxyz8221-Apr-05 1:08 
GeneralRe: Which one is faster - Static function calls or If else? Pin
leppie21-Apr-05 1:39
leppie21-Apr-05 1:39 
AnswerRe: Which one is faster - Static function calls or If else? Pin
Ashok Dhamija21-Apr-05 1:50
Ashok Dhamija21-Apr-05 1:50 
GeneralRe: Which one is faster - Static function calls or If else? Pin
Dave Kreskowiak21-Apr-05 2:38
mveDave Kreskowiak21-Apr-05 2:38 
GeneralRe: Which one is faster - Static function calls or If else? Pin
Ashok Dhamija21-Apr-05 18:57
Ashok Dhamija21-Apr-05 18:57 
GeneralRe: Which one is faster - Static function calls or If else? Pin
Dave Kreskowiak22-Apr-05 1:11
mveDave Kreskowiak22-Apr-05 1:11 
That's what I though would happen. What I think the comiler did to your original code, was that since your using contant numbers, the "?:" statement was optimized into the only result possible for that statement and was replaced by a simple numerical assignment.


RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralRe: Which one is faster - Static function calls or If else? Pin
Dave Kreskowiak22-Apr-05 9:16
mveDave Kreskowiak22-Apr-05 9:16 
GeneralRe: Which one is faster - Static function calls or If else? Pin
leppie21-Apr-05 6:18
leppie21-Apr-05 6:18 
GeneralRe: Which one is faster - Static function calls or If else? Pin
Ashok Dhamija21-Apr-05 18:19
Ashok Dhamija21-Apr-05 18:19 
AnswerRe: Which one is faster - Static function calls or If else? Pin
Tom Larsen21-Apr-05 5:23
Tom Larsen21-Apr-05 5:23 
GeneralPlease help.... Pin
KORCARI21-Apr-05 0:42
KORCARI21-Apr-05 0:42 
GeneralMapInfo files... drawing map... Pin
yarns21-Apr-05 0:07
yarns21-Apr-05 0:07 
GeneralHelp -- AutoHide panels Pin
Umair Tariq20-Apr-05 22:45
Umair Tariq20-Apr-05 22:45 
GeneralRe: Help -- AutoHide panels Pin
Ashok Dhamija21-Apr-05 2:10
Ashok Dhamija21-Apr-05 2:10 
GeneralRe: Help -- AutoHide panels[Solved] Pin
Umair Tariq28-Apr-05 20:27
Umair Tariq28-Apr-05 20:27 
GeneralRe: Help -- AutoHide panels[Solved] Pin
erdem0122-Dec-08 3:20
erdem0122-Dec-08 3:20 
GeneralPainting Pin
Mark_Harrison20-Apr-05 22:16
Mark_Harrison20-Apr-05 22:16 
GeneralRe: Painting Pin
S. Senthil Kumar20-Apr-05 23:08
S. Senthil Kumar20-Apr-05 23:08 
GeneralRe: Painting Pin
Mark_Harrison20-Apr-05 23:40
Mark_Harrison20-Apr-05 23:40 
GeneralWebpages in Winforms[Solved] Pin
V.20-Apr-05 22:00
professionalV.20-Apr-05 22:00 
GeneralRe: Webpages in Winforms Pin
Umair Tariq20-Apr-05 22:49
Umair Tariq20-Apr-05 22:49 
GeneralRe: Webpages in Winforms Pin
V.20-Apr-05 23:13
professionalV.20-Apr-05 23:13 
GeneralRe: Webpages in Winforms[Solved] Pin
Kodanda Pani20-Apr-05 23:08
Kodanda Pani20-Apr-05 23:08 

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.