Click here to Skip to main content
15,901,505 members
Home / Discussions / C#
   

C#

 
QuestionOutlook addin integration problem with Outlook 2007 Pin
mosh_3311-Mar-10 6:52
mosh_3311-Mar-10 6:52 
QuestionSwitch versus an array of delegates Pin
PIEBALDconsult11-Mar-10 5:36
mvePIEBALDconsult11-Mar-10 5:36 
AnswerRe: Switch versus an array of delegates Pin
Saksida Bojan11-Mar-10 5:43
Saksida Bojan11-Mar-10 5:43 
AnswerRe: Switch versus an array of delegates Pin
Keith Barrow11-Mar-10 5:54
professionalKeith Barrow11-Mar-10 5:54 
GeneralRe: Switch versus an array of delegates Pin
PIEBALDconsult11-Mar-10 6:45
mvePIEBALDconsult11-Mar-10 6:45 
AnswerRe: Switch versus an array of delegates Pin
harold aptroot11-Mar-10 6:00
harold aptroot11-Mar-10 6:00 
GeneralRe: Switch versus an array of delegates Pin
PIEBALDconsult11-Mar-10 6:53
mvePIEBALDconsult11-Mar-10 6:53 
GeneralRe: Switch versus an array of delegates Pin
harold aptroot11-Mar-10 8:23
harold aptroot11-Mar-10 8:23 
So, I benchmarked it.
Switch: 150
Array of delegates: 676
Abstract methods, sealed: 2868
Abstract methods, not sealed: 2866
(the number is the tick count / 10 million, for a loop of 500 million iterations)

I'm surprised to see that sealed vs unsealed made absolutely no difference..
All tests were done in 64bit mode, on release, with no debugger attached, using the Stopwatch class. The methods did nothing, the switch had some integer additions in it to keep it from being optimized away (not sure whether it would even do that, but an addition is nearly free anyway and it's safer that way)
GeneralRe: Switch versus an array of delegates Pin
PIEBALDconsult11-Mar-10 10:12
mvePIEBALDconsult11-Mar-10 10:12 
GeneralRe: Switch versus an array of delegates Pin
harold aptroot11-Mar-10 10:44
harold aptroot11-Mar-10 10:44 
AnswerRe: Switch versus an array of delegates Pin
Luc Pattyn11-Mar-10 6:04
sitebuilderLuc Pattyn11-Mar-10 6:04 
GeneralRe: Switch versus an array of delegates Pin
Dave Kreskowiak11-Mar-10 6:38
mveDave Kreskowiak11-Mar-10 6:38 
GeneralRe: Switch versus an array of delegates Pin
Luc Pattyn11-Mar-10 6:58
sitebuilderLuc Pattyn11-Mar-10 6:58 
GeneralRe: Switch versus an array of delegates Pin
DaveyM6911-Mar-10 7:56
professionalDaveyM6911-Mar-10 7:56 
GeneralRe: Switch versus an array of delegates Pin
PIEBALDconsult11-Mar-10 8:03
mvePIEBALDconsult11-Mar-10 8:03 
GeneralRe: Switch versus an array of delegates Pin
Dave Kreskowiak11-Mar-10 9:11
mveDave Kreskowiak11-Mar-10 9:11 
GeneralRe: Switch versus an array of delegates Pin
dybs11-Mar-10 17:28
dybs11-Mar-10 17:28 
GeneralRe: Switch versus an array of delegates Pin
Luc Pattyn11-Mar-10 17:38
sitebuilderLuc Pattyn11-Mar-10 17:38 
GeneralRe: Switch versus an array of delegates Pin
PIEBALDconsult11-Mar-10 6:41
mvePIEBALDconsult11-Mar-10 6:41 
QuestionCreating system of separation access rights Pin
Xgener11-Mar-10 5:26
Xgener11-Mar-10 5:26 
AnswerRe: Creating system of separation access rights Pin
Saksida Bojan11-Mar-10 5:56
Saksida Bojan11-Mar-10 5:56 
QuestionOutlook - with Hotmail account Pin
chiky_ancutza11-Mar-10 5:21
chiky_ancutza11-Mar-10 5:21 
QuestionGameServer Query A2S_PLAYER Problem Pin
Nokia555611-Mar-10 5:21
Nokia555611-Mar-10 5:21 
QuestionRotate an rectangle while moving the mouse... and watch it rotating Pin
nwl11-Mar-10 3:01
nwl11-Mar-10 3:01 
AnswerRe: Rotate an rectangle while moving the mouse... and watch it rotating Pin
OriginalGriff11-Mar-10 3:52
mveOriginalGriff11-Mar-10 3:52 

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.