In C# is there any significant performance difference for using UInt32 vs Int32

I am porting an existing application to C# and want to improve performance wherever possible. Many existing loop counters and array references are defined as System.UInt32, instead of the Int32 I would have used.

Is there any significant performance difference for using UInt32 vs Int32?

Answers


I don't think there are any performance considerations, other than possible difference between signed and unsigned arithmetic at the processor level but at that point I think the differences are moot.

The bigger difference is in the CLS compliance as the unsigned types are not CLS compliant as not all languages support them.


Need Your Help

migrating large data between systems

java database web-services jsp design

I need a suggestion to implement a functionality for my application. My application is a legacy JSP , JDBC application installed in client environments used by internal employees of the client. I h...

Rails Ember hybrid application

ruby-on-rails ruby web-applications ember.js ember-rails

I have created a rails application and plan on using ember to implement a piece of it. Basically I want one route to link with an ember application, while other pages are traditional rails. However...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.