[python-dtcwt] 178/497: opencl: make benchmark output more understandable

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Tue Jul 21 18:06:02 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/sid
in repository python-dtcwt.

commit e2ef264dd9322533fca783bdc4fe21edb6a875f0
Author: Rich Wareham <rjw57 at cam.ac.uk>
Date:   Sat Nov 9 17:08:53 2013 +0000

    opencl: make benchmark output more understandable
    
    "Percentage speed up" is a bit of a woolly term. Replace it with a
    straightforward multiplier.
---
 scripts/benchmark_opencl.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/benchmark_opencl.py b/scripts/benchmark_opencl.py
index 88253de..9d57687 100644
--- a/scripts/benchmark_opencl.py
+++ b/scripts/benchmark_opencl.py
@@ -54,7 +54,7 @@ def main():
     print('Running OpenCL colfilter...')
     b = benchmark('colfilter(lena, h1o)',
             'from dtcwt.opencl.lowlevel import colfilter; from __main__ import lena, h1o')
-    print('Percentage speed up: {0:.0f}%'.format(1e2*a/b))
+    print('Speed up: x{0:.2f}'.format(a/b))
     print('=====')
 
     print('Running NumPy coldfilt...')
@@ -63,7 +63,7 @@ def main():
     print('Running OpenCL coldfilt...')
     b = benchmark('coldfilt(lena, h0b, h0a)',
             'from dtcwt.opencl.lowlevel import coldfilt; from __main__ import lena, h0b, h0a')
-    print('Percentage speed up: {0:.0f}%'.format(1e2*a/b))
+    print('Speed up: x{0:.2f}'.format(a/b))
     print('=====')
 
     print('Running NumPy colifilt...')
@@ -72,7 +72,7 @@ def main():
     print('Running OpenCL colifilt...')
     b = benchmark('colifilt(lena, h0b, h0a)',
             'from dtcwt.opencl.lowlevel import colifilt; from __main__ import lena, h0b, h0a')
-    print('Percentage speed up: {0:.0f}%'.format(1e2*a/b))
+    print('Speed up: x{0:.2f}'.format(a/b))
     print('=====')
 
     print('Running NumPy dtwavexfm2...')
@@ -81,7 +81,7 @@ def main():
     print('Running OpenCL dtwavexfm2...')
     b = benchmark('dtwavexfm2(lena)',
             'from dtcwt.opencl.transform2d import dtwavexfm2; from __main__ import lena')
-    print('Percentage speed up: {0:.0f}%'.format(1e2*a/b))
+    print('Speed up: x{0:.2f}'.format(a/b))
     print('=====')
 
 if __name__ == '__main__':

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-dtcwt.git



More information about the debian-science-commits mailing list