MulticoreInfo.com header image 2

Boosting Performance with Atomic Operations in .NET 4

August 24th, 2010 · No Comments




by Gaston Hillar
When you write concurrent code that has to make changes to shared variables, you might think that a mutual-exclusion lock is necessary to perform each update operation. In some cases, you can replace a mutual-exclusion lock with a more efficient atomic operation and you can boost both your application’s performance and scalability.

When you want to achieve the best performance for a parallelized algorithm, you can follow James Reinders’ 8 Rules for Parallel Programming for Multicore. Here I focus my attention on the importance of Rule #5 that suggests the usage of atomic operations instead of locks, whenever possible.

Full Story

  • Share/Save/Bookmark

Tags: MulticoreInfo

Like what you're reading? Come back every day for multicore news, or subscribe to RSS updates.



Stumble It!     


0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

You must log in to post a comment.