From 6b1dcaa962133cfedcc7055b6979d0af0bf87401 Mon Sep 17 00:00:00 2001 From: treeform Date: Sun, 10 Jul 2022 15:49:50 -0700 Subject: [PATCH] Run less bench jpeg. --- tests/bench_jpeg.nim | 57 ++++++-------------------------------------- 1 file changed, 7 insertions(+), 50 deletions(-) diff --git a/tests/bench_jpeg.nim b/tests/bench_jpeg.nim index ec2a154..6c79c6d 100644 --- a/tests/bench_jpeg.nim +++ b/tests/bench_jpeg.nim @@ -2,63 +2,20 @@ import benchy, pixie/fileformats/jpeg, os const jpegFiles* = [ - (100, "tests/fileformats/jpeg/masters/red.jpg"), - (100, "tests/fileformats/jpeg/masters/green.jpg"), - (100, "tests/fileformats/jpeg/masters/blue.jpg"), - (100, "tests/fileformats/jpeg/masters/white.jpg"), - (100, "tests/fileformats/jpeg/masters/black.jpg"), - - (100, "tests/fileformats/jpeg/masters/8x8.jpg"), - (100, "tests/fileformats/jpeg/masters/8x8_progressive.jpg"), - - (20, "tests/fileformats/jpeg/masters/16x16.jpg"), - (20, "tests/fileformats/jpeg/masters/16x16_progressive.jpg"), - - (10, "tests/fileformats/jpeg/masters/f1-exif.jpg"), - (10, "tests/fileformats/jpeg/masters/f2-exif.jpg"), - (10, "tests/fileformats/jpeg/masters/f3-exif.jpg"), - (10, "tests/fileformats/jpeg/masters/f4-exif.jpg"), - (10, "tests/fileformats/jpeg/masters/f5-exif.jpg"), - (10, "tests/fileformats/jpeg/masters/f6-exif.jpg"), - (10, "tests/fileformats/jpeg/masters/f7-exif.jpg"), - (10, "tests/fileformats/jpeg/masters/f8-exif.jpg"), - - (1, "tests/fileformats/jpeg/masters/quality_01.jpg"), - (1, "tests/fileformats/jpeg/masters/quality_10.jpg"), - (1, "tests/fileformats/jpeg/masters/quality_25.jpg"), - (1, "tests/fileformats/jpeg/masters/quality_50.jpg"), - (1, "tests/fileformats/jpeg/masters/quality_100.jpg"), - - (1, "tests/fileformats/jpeg/masters/cat_4_4_4.jpg"), - (1, "tests/fileformats/jpeg/masters/cat_4_4_4.jpg"), - (1, "tests/fileformats/jpeg/masters/cat_4_2_2.jpg"), - (1, "tests/fileformats/jpeg/masters/cat_4_2_0.jpg"), - (1, "tests/fileformats/jpeg/masters/cat_4_1_1.jpg"), - (1, "tests/fileformats/jpeg/masters/cat_4_2_0_progressive.jpg"), - (1, "tests/fileformats/jpeg/masters/cat_4_4_4_progressive.jpg"), - (1, "tests/fileformats/jpeg/masters/cat_restart_markers_5.jpg"), - (1, "tests/fileformats/jpeg/masters/cat_restart_markers_5_progressive.jpg"), - - (1, "tests/fileformats/jpeg/masters/mandrill.jpg"), - (1, "tests/fileformats/jpeg/masters/exif_overrun.jpg"), - (1, "tests/fileformats/jpeg/masters/grayscale_test.jpg"), - (1, "tests/fileformats/jpeg/masters/progressive.jpg"), - - (1, "tests/fileformats/jpeg/masters/testimg.jpg"), - (1, "tests/fileformats/jpeg/masters/testimgp.jpg"), - (1, "tests/fileformats/jpeg/masters/testorig.jpg"), - (1, "tests/fileformats/jpeg/masters/testprog.jpg"), + "tests/fileformats/jpeg/masters/mandrill.jpg", + "tests/fileformats/jpeg/masters/exif_overrun.jpg", + "tests/fileformats/jpeg/masters/grayscale_test.jpg", + "tests/fileformats/jpeg/masters/progressive.jpg" ] -for (times, file) in jpegFiles: +for file in jpegFiles: let data = readFile(file) timeIt "pixie " & file.splitPath.tail & " decode": - for i in 0 ..< times: - discard decodeJpeg(data) + discard decodeJpeg(data) # import stb_image/read as stbi # block: -# for file in jpegSuiteFiles: +# for file in jpegFiles: # let data = readFile(file) # var name = file.splitPath.tail