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

C#

 
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 
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 
Without further investigation the second one would seem faster. If you really want to know for sure construct a simple test example that just reads each pixel on a bitmap and runs one or the other comparison and time the event.

However I would caution you about attempting optimization like this because premature optimization is evil. Smile | :) Without profiling tools trying to optmize can lead to confusing code and worse even worse performance (ie. producing bogus output, crashing, etc). The best optimization might happen outside of this code and quite possibly be in another part of the loop. Or ultimately, this is a "hardware bound" problem where no matter how much tweaking you do to code you are better off taking the amount of money they would have paid you to tweak code and buying new hardware with it.
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 
GeneralRe: Webpages in Winforms[Solved] Pin
V.20-Apr-05 23:11
professionalV.20-Apr-05 23:11 
GeneralURGENT DATAGRID PROBLEM!!PLEASE HELP Pin
innocent7320-Apr-05 21:40
innocent7320-Apr-05 21:40 
GeneralIMPORTANT -- System.Reflection Pin
Den2Fly20-Apr-05 21:32
Den2Fly20-Apr-05 21:32 
Generalmove & rotate objects Pin
malahat20-Apr-05 20:42
malahat20-Apr-05 20:42 

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.