Click here to Skip to main content
12,445,482 members (59,013 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

10.6K views
1 bookmarked
Posted

.Net Performance tip - 2

, 22 May 2010 CPOL
Rate this:
Please Sign up or sign in to vote.
.Net Performance tip - 2
.Net Performance tip - 2

Last week i was doing some exploration on performance of if statements vs switch statements and surprisingly i found that switch is more performance intent than the if statements.

Hence the recomendation would be to prefer swicth over if statements.

I hope this helps!.

Regards,
-Vinayak

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Vinayaka Krishna Shenoy
Architect MindTree Ltd
India India
Motivated achiever who guides organizations in applying technology to business settings, provides added value, and creates project deliverables in a timely manner. An experienced Technical Consultant, have successfully led large project teams of more than 20 people from requirements gathering to implementation and support using C#, .NET ,ADO.NET, ADO.NET Entity Framework,ASP.NET,ASP.NET MVC, WCF and SQL Server.

You may also be interested in...

Pro
Pro

Comments and Discussions

 
GeneralReason for my vote of 3 No backup to your reasoning hence a ... Pin
Simon_Whale5-Nov-10 2:35
memberSimon_Whale5-Nov-10 2:35 
GeneralReason for my vote of 1 lacking accurate performance numbers Pin
Chirag J Patel2-Aug-10 9:51
memberChirag J Patel2-Aug-10 9:51 
Generalcheck out the link provided by daveauld (alternate1) - this ... Pin
johannesnestler25-May-10 4:19
memberjohannesnestler25-May-10 4:19 
GeneralReason for my vote of 2 mentioned by the other voters: give ... Pin
johannesnestler25-May-10 4:14
memberjohannesnestler25-May-10 4:14 
Reason for my vote of 2
mentioned by the other voters: give numbers or testcode.
GeneralReason for my vote of 1 useless without numbers Pin
SledgeHammer0122-May-10 8:08
memberSledgeHammer0122-May-10 8:08 
GeneralReason for my vote of 1 useless without numbers. Pin
SledgeHammer0122-May-10 8:08
memberSledgeHammer0122-May-10 8:08 
GeneralReason for my vote of 2 Lacking information to substantiate ... Pin
daveauld22-May-10 3:01
mentordaveauld22-May-10 3:01 
GeneralIt would be of benefit if you provided code on how you perfo... Pin
daveauld22-May-10 2:27
mentordaveauld22-May-10 2:27 
GeneralIf and Switch statements performance Pin
Ravi LVS23-May-10 23:46
memberRavi LVS23-May-10 23:46 

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.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160811.3 | Last Updated 22 May 2010
Article Copyright 2010 by Vinayaka Krishna Shenoy
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid