The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,914 other followers

Archive for October 10th, 2017

`Inc(I)` versus `I := I + 1;` in Delphi – they’re the same, but not atomic per se.

Posted by jpluimers on 2017/10/10

Given a variable I: Integer, some people like Inc(I); others like I := I + 1;.

You might think that part of that discussion nowadays should be multithreading.

In practice this does not matter: the compiler will use the same instructions for both statements.

TL;DR: This might make you think they are always atomic. But that’s not always true, as the below differences show. In addition, it can also depend on your processor archicture.

In the Win32 Delphi Compiler, this is how they look:

Read the rest of this entry »

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | 5 Comments »

Multithreading in C# .NET 4.5 (Part 2) – CodeProject

Posted by jpluimers on 2017/10/10

Always good having a reference article at hand: [WayBackMultithreading in C# .NET 4.5 (Part 2) – CodeProject

via: [WayBackBest C# Article of September 2016 PureNsanity – Multithreading in C# .NET 4.5 (Part 2)Runner UpSnesh Prajapati – Factory Patterns – Simple Factory … – CodeProject – Google+


Posted in .NET, .NET 4.5, C#, C# 4.0, C# 5.0, C# 6 (Roslyn), Development, Software Development | 1 Comment »

%d bloggers like this: