Quantcast
Channel: Delphi – The Wiert Corner – irregular stream of stuff
Viewing all articles
Browse latest Browse all 1440

TMonitor versus Critical sections revisited: when possible, use SRWL over TMonitor, then TCritical section

$
0
0

Via [WayBack] TMonitor vrs Critical sections revisited. Back then (https://www.delphitools.info/2013/06/06/tmonitor-vs-trtlcriticalsection/), it was found that critic… – Kiriakos Vlahos – Google+ as he re-did the measurements that DelphiTools did before Delphi XE5 came out:

Slim Reader/Writer Lock (SWRL) is even faster than TMonitor:

  • CriticalSection 0.035
  • TMonitor 0.019
  • SWRL 0.012

Of course if you have a speedy lock-free solution, that is always favourable, but few people know how to write lock free data structures or how to find the libraries (despite Julian Bucknall covering quite a few of them in Delphi back in the days).

Related:

–jeroen


Viewing all articles
Browse latest Browse all 1440

Trending Articles