Alex Rivera | Logout

Is there a performance degradation when we ALWAYS use nullable value types instead of value types?

Asked 2011-02-05T01:26:20.323
11

Is there a performance degradation when we ALWAYS use nullable value types instead of value types?

c#
Edit
Report

1 Answer

6

It's the price of copying the entire value type: pretty much nil for things like integers, GUID's, etc., but it's large if you're constantly copying 512-KB value types (which you shouldn't be having in the first place) inside a tight loop.

answered 2011-02-05T01:33:59.533

Your Answer