If one section is markedly more inefficient than the others, you have identified where you need to work to improve the code for the biggest gain in performance. Kufrin quickly noticed that the particular code parallelized and scaled very well in whole and in its parts. When processes need to synchronize, they enter a barrier and wait until all the processes have arrived. Subsequent steps in the code are not executed until all the processes have arrived and are synchronized. How Barriers Are Used Barriers are not among the first things considered as a performance factor in optimizing code.
Modern compilers generate barriers implicitly, such as when a loop is executed in parallel.
This is the more common instance of barriers, but Kufrin was called in on an explicit use of barriers. In some cases, such as during application set-ups, barriers are used explicitly. Kufrin's work, which which took place in early 1998, found substantial differences in the performance of many commonly used barriers. This version is the one typically used by researchers who are developing applications using the parallelizing compilers available on the NCSA Origin2000. Atomic uncached instructions operate directly on main memory, bypassing the primary and secondary caches.