LWN.net Logo

Advertisement

Advanced thin client solution for Linux, based on Open Source. Mix Windows and Linux, with hardware accelerated OpenGL!

Advertise here

Mean value

Mean value

Posted Feb 3, 2006 10:39 UTC (Fri) by man_ls (subscriber, #15091)
In reply to: Mean value by obobo
Parent article: The search for fast, scalable counters

So, just stick to the size native to the architecture. On 32-bit machines, never use more than 32 bits for the intermediate values; if you happen to be on a Z80 (not so mythical 8-bit architecture) use a max value of 255 for them.

Incrementing a 32-bit register on a 32-bit architecture is an atomic operation even on multi-processor systems, right?


(Log in to post comments)

LinuxCon 2009

Copyright © 2009, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds