16
votes
Vote UpVote

Fixing TCriticalSection

DelphiTools – TCriticalSection (along with TMonitor) suffers from a severe design flaw in which entering/leaving different TCriticalSection instances can end up serializing your threads, and the whole can even end up performing worse than if your threads had been serialized. This is because it’s a small, dynamically allocated object, so several TCriticalSection instances can end up in the same CPU cache line, and when that happens, you’ll have cache conflicts aplenty between the cores running the threads. How severe can that be? Well, it depends on how many cores you have, but the more cores you ...
Favorite? Off-Topic? Eric @ 2011-11-30 15:18

Statistics

Visits: 1341
Votes: 16
Favorites: 1
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Alister Christie
Chris Rolliston
Ericc
Fran├žois
Jan Derk
knight_killer
Kyle A. Miller
Leif Uneus
Ph. B.
Primoz Gabrijelcic
Rajeem Cariazo
stukelly
TOndrej
vcldeveloper
Yogi Yang
Zzzzz
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)