Click here to Skip to main content
15,884,836 members
Home / Discussions / C#
   

C#

 
AnswerRe: A question of microoptimization Pin
Richard MacCutchan2-Apr-21 22:32
mveRichard MacCutchan2-Apr-21 22:32 
GeneralRe: A question of microoptimization Pin
OriginalGriff3-Apr-21 0:59
mveOriginalGriff3-Apr-21 0:59 
GeneralRe: A question of microoptimization Pin
Richard MacCutchan3-Apr-21 1:05
mveRichard MacCutchan3-Apr-21 1:05 
GeneralRe: A question of microoptimization Pin
Jörgen Andersson5-Apr-21 20:15
professionalJörgen Andersson5-Apr-21 20:15 
AnswerRe: A question of microoptimization Pin
OriginalGriff3-Apr-21 1:01
mveOriginalGriff3-Apr-21 1:01 
GeneralRe: A question of microoptimization Pin
Jörgen Andersson3-Apr-21 1:08
professionalJörgen Andersson3-Apr-21 1:08 
GeneralRe: A question of microoptimization Pin
OriginalGriff3-Apr-21 1:17
mveOriginalGriff3-Apr-21 1:17 
GeneralRe: A question of microoptimization Pin
harold aptroot3-Apr-21 1:37
harold aptroot3-Apr-21 1:37 
No, that's wrong. It's a classic case of "measuring time but not looking at what the time was measured of".

The best the remainder solution can hope for, is that the JIT compiler recognizes it and turns it into the equivalent of the bitwise-AND solution, which happens for uint but not int. So at best it is the exact same code running, any differences observed in timing are just timing noise. And sometimes (eg for int), it's just straight up worse to use the remainder instead of bitwise AND.
AnswerRe: A question of microoptimization Pin
#realJSOP3-Apr-21 2:04
mve#realJSOP3-Apr-21 2:04 
GeneralRe: A question of microoptimization Pin
harold aptroot3-Apr-21 2:14
harold aptroot3-Apr-21 2:14 
GeneralRe: A question of microoptimization Pin
#realJSOP3-Apr-21 2:19
mve#realJSOP3-Apr-21 2:19 
GeneralRe: A question of microoptimization Pin
harold aptroot3-Apr-21 2:23
harold aptroot3-Apr-21 2:23 
AnswerRe: A question of microoptimization Pin
Dave Kreskowiak3-Apr-21 5:50
mveDave Kreskowiak3-Apr-21 5:50 
GeneralRe: A question of microoptimization Pin
Jörgen Andersson3-Apr-21 5:56
professionalJörgen Andersson3-Apr-21 5:56 
QuestionHow to remove rows of a DataTable based on checkboxes? Pin
Alex Dunlop1-Apr-21 8:47
Alex Dunlop1-Apr-21 8:47 
AnswerRe: How to remove rows of a DataTable based on checkboxes? Pin
OriginalGriff1-Apr-21 9:33
mveOriginalGriff1-Apr-21 9:33 
GeneralRe: How to remove rows of a DataTable based on checkboxes? Pin
Alex Dunlop1-Apr-21 18:11
Alex Dunlop1-Apr-21 18:11 
GeneralRe: How to remove rows of a DataTable based on checkboxes? Pin
jschell9-Apr-21 14:59
jschell9-Apr-21 14:59 
GeneralRe: How to remove rows of a DataTable based on checkboxes? Pin
Alex Dunlop1-Apr-21 18:24
Alex Dunlop1-Apr-21 18:24 
GeneralRe: How to remove rows of a DataTable based on checkboxes? Pin
Alex Dunlop1-Apr-21 18:28
Alex Dunlop1-Apr-21 18:28 
AnswerRe: How to remove rows of a DataTable based on checkboxes? Pin
Mycroft Holmes1-Apr-21 13:58
professionalMycroft Holmes1-Apr-21 13:58 
GeneralRe: How to remove rows of a DataTable based on checkboxes? Pin
Alex Dunlop1-Apr-21 18:12
Alex Dunlop1-Apr-21 18:12 
GeneralRe: How to remove rows of a DataTable based on checkboxes? Pin
Mycroft Holmes2-Apr-21 13:18
professionalMycroft Holmes2-Apr-21 13:18 
AnswerRe: How to remove rows of a DataTable based on checkboxes? Pin
Gerry Schmitz1-Apr-21 18:28
mveGerry Schmitz1-Apr-21 18:28 
GeneralRe: How to remove rows of a DataTable based on checkboxes? Pin
Alex Dunlop1-Apr-21 18:32
Alex Dunlop1-Apr-21 18:32 

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.