Skip to content

Instantly share code, notes, and snippets.

@kholia
Last active December 18, 2015 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kholia/5806994 to your computer and use it in GitHub Desktop.
Save kholia/5806994 to your computer and use it in GitHub Desktop.
benchmarking-gimp

Goal

Address Jakub's concerns regarding the performance impact of PIE. See :

https://lists.fedoraproject.org/pipermail/devel/2013-April/181171.html

Why Gimp

Gimp has lot of dependencies :

$ ldd /usr/bin/gimp-2.8 | wc -l
77

$ du -hs /usr/bin/gimp-2.8
5.8M    /usr/bin/gimp-2.8

Now comparing this to libreoffice :

$ ldd /usr/lib64/libreoffice/program/soffice.bin | wc -l
81

$ du -hs /usr/lib64/libreoffice/program/soffice.bin
40K  /usr/lib64/libreoffice/program/soffice.bin

So Gimp is a more "suitable" target for benchmarking purposes.

Benchmarking Gimp

  • Get test data from :

    http://www.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/BSR/
    http://www.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/BSR/BSR_bsds500.tgz
  • Patch for building Gimp as PIE can be obtained from :

    https://github.com/kholia/unSPEC
  • Benchmarking scripts can be obtained form :

    https://github.com/kholia/gimp-bench
  • Copy flipscale.py to ~/.gimp-2.8/plug-ins/ and do chmod +x ~/.gimp-2.8/plug-ins/flipscale.py
  • Copy fubatchpy.scm to ~/.gimp-2.8/scripts/
  • time gimp -i -b '(call_py_flipscale "pics/*.jpg" 120 150)' -b '(gimp-quit 0)'
  • For best results, keep the test data in RAMDISK.

Gimp Results

  • ~ 39.160s ==> upstream compiled by me (PIE)
  • ~ 39.750s ==> upstream stock (PIE)
  • ~ 40.850s ==> "non-PIE" my build (no PIE)

Notes

  • Running prelink on the "non-PIE" build resulted in no visible difference.
  • This test is borrowed from http://www.exp-media.com/fr/node/19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment