blob: 2bc1a188fc65051b301086453f1c36cca78f4851 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
|
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" />
<title>GraphicsMagick vs ImageMagick Benchmarks</title>
<link rel="stylesheet" href="docutils-articles.css" type="text/css" />
</head>
<body>
<div class="banner">
<img src="images/gm-107x76.png" alt="GraphicMagick logo" width="107" height="76" />
<span class="title">GraphicsMagick</span>
<form action="http://www.google.com/search">
<input type="hidden" name="domains" value="www.graphicsmagick.org" />
<input type="hidden" name="sitesearch" value="www.graphicsmagick.org" />
<span class="nowrap"><input type="text" name="q" size="25" maxlength="255" /> <input type="submit" name="sa" value="Search" /></span>
</form>
</div>
<div class="navmenu">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="project.html">Project</a></li>
<li><a href="download.html">Download</a></li>
<li><a href="README.html">Install</a></li>
<li><a href="Hg.html">Source</a></li>
<li><a href="NEWS.html">News</a> </li>
<li><a href="utilities.html">Utilities</a></li>
<li><a href="programming.html">Programming</a></li>
<li><a href="reference.html">Reference</a></li>
</ul>
</div>
<div class="document" id="graphicsmagick-vs-imagemagick-benchmarks">
<h1 class="title">GraphicsMagick vs ImageMagick Benchmarks</h1>
<!-- -*- mode: rst -*- -->
<!-- This text is in reStucturedText format, so it may look a bit odd. -->
<!-- See http://docutils.sourceforge.net/rst.html for details. -->
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#foreword" id="id1">Foreword</a></li>
<li><a class="reference internal" href="#strategy" id="id2">Strategy</a></li>
<li><a class="reference internal" href="#the-benchmark" id="id3">The Benchmark</a></li>
</ul>
</div>
<div class="section" id="foreword">
<h1><a class="toc-backref" href="#id1">Foreword</a></h1>
<p>This page used to document benchmark results which compared
GraphicsMagick 1.3.8 performance to ImageMagick 6.5.8-10 performance.
We found that GraphicsMagick was usually considerably faster at
executing image processing operations from the command line than
ImageMagick 6.5.8-10 was. One ImageMagick algorithm ran as much as 770
times slower. GraphicsMagick clearly ran much more efficiently under
Microsoft Windows.</p>
<p>We now find that a simple head to head performance comparison between
GraphicsMagick and recent ImageMagick is no longer possible because
ImageMagick has changed the meanings of the existing arguments. In
particular, we discovered that ImageMagick filter arguments producing
convolution matrices are now producing lower-order convolution
matrices representing perhaps an order of magnitude less work given
the same arguments. The resulting images are visually substantially
less filtered. Using the same command-line filter arguments causes
GraphicsMagick to appear slower when it is actually doing far more
work than ImageMagick.</p>
<p>Due to it not being feasable to do a head to head performance
measurement between GraphicsMagick and ImageMagick, we have decided to
not post results at the moment. However, the strategy and a simple
benchmark driver script are still provided for those who want to do
their own performance comparisons between GraphicsMagick and
ImageMagick.</p>
</div>
<div class="section" id="strategy">
<h1><a class="toc-backref" href="#id2">Strategy</a></h1>
<p>The benchmark focuses on the ability to process many medium sized
HD-resolution (1920x1080 pixels) images. In order to prevent disk I/O
from being a factor, we use a small input image and tile it to create
a larger input image via the "tile:" coder. The processed image is
sent to the "null:" coder so that file writes to a slow disk are also
not a factor. Static executables are used and executed via full paths
in order to minimize variability from the execution environment. In
order to obtain accurate and useful timing, we use the bash shell to
execute the command 40 times and see how long it takes. This is a very
simple benchmark approach which is quite representative of the
performance that the typical user observes.</p>
<p>This new benchmark reveals the following performance criteria:</p>
<blockquote>
<ul class="simple">
<li>Basic execution overhead of the software.</li>
<li>Image processing algorithmic efficiency.</li>
<li>Efficacy of OpenMP enhancements.</li>
</ul>
</blockquote>
</div>
<div class="section" id="the-benchmark">
<h1><a class="toc-backref" href="#id3">The Benchmark</a></h1>
<p>The benchmark is quite simple. It reads a list of commands to execute
from a file named "commands.txt" and times how long it takes to
execute each command 40 times using GraphicsMagick and ImageMagick.</p>
<p>Here is the simple benchmark script:</p>
<pre class="literal-block">
#!/usr/bin/env bash
#
# Measure the performance between two 'convert' commands by
# executing a subcommand through many iterations and seeing
# the total time that it takes.
#
# Written by Bob Friesenhahn, October 2008
#
# GraphicsMagick
convert1='/usr/local/bin/gm convert'
#convert1='/c/Program\ Files/GraphicsMagick-1.3.8-Q16/gm.exe convert'
# ImageMagick
convert2='/usr/local/bin/convert'
#convert2='/c/Program\ Files/ImageMagick-6.5.9-Q16/convert.exe'
# Input file specification
input_image='-size 1920x1080 tile:model.pnm'
# Ouput file specification
output_image="null:"
# Should not need to change any of the rest
typeset -i iterations=40
echo "Convert-1: ${convert1}"
echo "Version: `eval "${convert1}" -version | head -1`"
echo "Convert-2: ${convert2}"
echo "Version: `eval "${convert2}" -version | head -1`"
echo "Date: `date`"
echo "Host: `uname -n`"
echo "OS: `uname -s`"
echo "Release: `uname -r`"
echo "Arch: `uname -p`"
echo "Input File: ${input_image}"
echo "Output File: ${output_image}"
echo "Threads: ${OMP_NUM_THREADS:-1}"
echo "Iterations: ${iterations}"
echo "========================================================================================"
echo
typeset -i count=0 i=0
cat commands.txt | while read subcommand
do
echo ${subcommand}
command1="${convert1} ${input_image} ${subcommand} ${output_image}"
i=0
count=$iterations
time while ((i < count))
do
eval "${command1}"
let i=i+1
done
sleep 1
command2="${convert2} ${input_image} ${subcommand} ${output_image}"
i=0
count=$iterations
time while ((i < count))
do
eval "${command2}"
let i=i+1
done
echo
sleep 1
done 2>&1
</pre>
</div>
</div>
<hr class="docutils">
<div class="document">
<p><a href="Copyright.html">Copyright</a> © GraphicsMagick Group 2002 - 2020<!--SPONSOR_LOGO--></p>
</div>
</body>
</html>
|