Noise generation operators faster

Bob Friesenhahn <[email protected]> Thu, 28 Aug 2008 23:10:13 -0500 (CDT)
Newsgroups gmane.comp.video.graphicsmagick.core
Message-ID <[email protected]>
Today the noise generation operators became much faster with OpenMP. 
Previously they just got slower the more threads which were added. 
Noise generation is classic for OpenMP since it consumes lots of CPU. 
Here are the results of a simple test run under Solaris:

% for threads in 1 2 3 4
do
echo "Threads $threads"
OMP_NUM_THREADS=$threads /home/bfriesen/gm16 benchmark -duration 10 \
convert -size 1024x768 \
-type truecolor 'xc:#F00' -operator all Noise-Gaussian 50% null:
done
Threads 1
Results: 11 iter 10.63s user 10.63s total 1.03 iter/s (1.03 iter/s cpu)
Threads 2
Results: 19 iter 20.18s user 10.11s total 1.88 iter/s (0.94 iter/s cpu)
Threads 3
Results: 29 iter 30.83s user 10.32s total 2.81 iter/s (0.94 iter/s cpu)
Threads 4
Results: 37 iter 39.28s user 10.03s total 3.69 iter/s (0.94 iter/s cpu)

Testing with Linux shows a perfect doubling of performance when using 
two threads.

Bob
======================================
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/