Click here to Skip to main content
15,921,577 members
Home / Discussions / C#
   

C#

 
AnswerRe: File Streamer Problems Pin
snorkie27-Jul-07 10:01
professionalsnorkie27-Jul-07 10:01 
AnswerRe: File Streamer Problems Pin
PhilDanger27-Jul-07 10:34
PhilDanger27-Jul-07 10:34 
QuestionPerformance difference?? Pin
Shy Agam27-Jul-07 9:42
Shy Agam27-Jul-07 9:42 
AnswerRe: Performance difference?? Pin
BoneSoft27-Jul-07 9:52
BoneSoft27-Jul-07 9:52 
AnswerRe: Performance difference?? Pin
Shy Agam27-Jul-07 10:02
Shy Agam27-Jul-07 10:02 
GeneralRe: Performance difference?? Pin
Luc Pattyn27-Jul-07 10:10
sitebuilderLuc Pattyn27-Jul-07 10:10 
GeneralRe: Performance difference?? Pin
Shy Agam27-Jul-07 10:13
Shy Agam27-Jul-07 10:13 
AnswerRe: Performance difference?? Pin
Luc Pattyn27-Jul-07 10:06
sitebuilderLuc Pattyn27-Jul-07 10:06 
Hi,

you should not believe everything they tell you.

int is a value type, it probably gets "allocated" on stack (meaning the stack pointer
gets lowered a bit more when you enter this method to reserve a spot for it),
this has zero cost.

(the probably means, maybe the int variable does not need storage, the JIT might
decide to keep it in one of the CPU registers, but I am not relying on this)

Anyway, there is no "new", no object, and no garbage collection involved.

both code snippets could and should result in exactly the same MSIL code;
and I would be very surprised if you can measure the slightest difference in
execution time (which would hint a compiler inefficiency, not an inherent difference
between both code snippets).

Smile | :)

Smile | :)


GeneralRe: Performance difference?? Pin
BoneSoft27-Jul-07 10:29
BoneSoft27-Jul-07 10:29 
GeneralRe: Performance difference?? Pin
Luc Pattyn27-Jul-07 10:46
sitebuilderLuc Pattyn27-Jul-07 10:46 
AnswerRe: Performance difference?? Pin
Paul Conrad27-Jul-07 10:07
professionalPaul Conrad27-Jul-07 10:07 
AnswerRe: Performance difference?? Pin
snorkie27-Jul-07 10:51
professionalsnorkie27-Jul-07 10:51 
GeneralRe: Performance difference?? Pin
PIEBALDconsult27-Jul-07 13:38
mvePIEBALDconsult27-Jul-07 13:38 
GeneralRe: Performance difference?? Pin
Luc Pattyn27-Jul-07 14:57
sitebuilderLuc Pattyn27-Jul-07 14:57 
AnswerMessage formatting question (expires on sunday) Pin
Luc Pattyn27-Jul-07 23:36
sitebuilderLuc Pattyn27-Jul-07 23:36 
GeneralRe: Message formatting question (expires on sunday) Pin
Shy Agam28-Jul-07 1:41
Shy Agam28-Jul-07 1:41 
GeneralRe: Message formatting question (expires on sunday) Pin
Luc Pattyn28-Jul-07 2:18
sitebuilderLuc Pattyn28-Jul-07 2:18 
QuestionHow to use C++ file ( header ) in C# project ? Pin
Yanshof27-Jul-07 8:35
Yanshof27-Jul-07 8:35 
AnswerRe: How to use C++ file ( header ) in C# project ? Pin
Judah Gabriel Himango27-Jul-07 9:21
sponsorJudah Gabriel Himango27-Jul-07 9:21 
GeneralRe: How to use C++ file ( header ) in C# project ? Pin
Yanshof27-Jul-07 10:37
Yanshof27-Jul-07 10:37 
GeneralRe: How to use C++ file ( header ) in C# project ? Pin
Judah Gabriel Himango27-Jul-07 10:55
sponsorJudah Gabriel Himango27-Jul-07 10:55 
Questionboolean variable as null Pin
ltmnm27-Jul-07 7:58
ltmnm27-Jul-07 7:58 
AnswerRe: boolean variable as null Pin
Justin Perez27-Jul-07 8:17
Justin Perez27-Jul-07 8:17 
GeneralRe: boolean variable as null Pin
Colin Angus Mackay27-Jul-07 22:52
Colin Angus Mackay27-Jul-07 22:52 
AnswerRe: boolean variable as null Pin
Abisodun27-Jul-07 8:19
Abisodun27-Jul-07 8:19 

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.