RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Cache line padding or alignment attribute

gilgamash

Knight
Hi all fellow coders,

a short question, perhaps someone has some experience ( I do not have a good profiler atm to test it ): For a quick performing thread safe queue I implemented I need the nodes of the queue to be cache aligned to prevent false sharing. Any idea whether

a) Doing cache line padding

is quicker than

b) using gnu attribute
Code:
__attribute__( (aligned(c_CachelineSize)) )
?

Thanks for help,
G.
 
Top