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