[gegl] perf: disable non-nearest gegl_buffer_sample() tests



commit 90a2dce87e3e961c444b44f0d902222a4a4ce2de
Author: Ell <ell_se yahoo com>
Date:   Sat Jun 30 03:44:04 2018 -0400

    perf: disable non-nearest gegl_buffer_sample() tests
    
    Since commit 26f13cbfe9aaaa8c176162e54fdbb8af6876538e,
    gegl_buffer_sample() has gotten much slower for non-nearest
    samplers; the corresponding tests in perf/test-samplers take
    forever as a result.  Let's simply disable them (note that the
    tests for gegl_sampler_get() and gegl_sampler_get_fun(), which is
    what performance-critical code should use anyway, are still enabled
    for all samplers.)

 perf/test-samplers.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/perf/test-samplers.c b/perf/test-samplers.c
index 1ee2f7a76..060771ba2 100644
--- a/perf/test-samplers.c
+++ b/perf/test-samplers.c
@@ -3,6 +3,12 @@
 #define BPP 16
 #define SAMPLES 250000
 
+/* gegl_buffer_sample() should not be used in performance-critical code.  the
+ * corresponding tests take a long time to finish, and are disabled by default.
+ * uncomment this line to enable them.
+ */
+/* #define TEST_BUFFER_SAMPLE */
+
 gint
 main (gint    argc,
       gchar **argv)
@@ -154,6 +160,7 @@ main (gint    argc,
   test_end ("sampler_get_fun nearest+babl", 1.0 * SAMPLES * ITERATIONS * BPP);
 
 
+#ifdef TEST_BUFFER_SAMPLE
   test_start ();
   for (i=0;i<ITERATIONS && converged < BAIL_COUNT;i++)
   {
@@ -170,6 +177,7 @@ main (gint    argc,
     test_end_iter();
   }
   test_end ("gegl_buffer_sample linear", 1.0 * SAMPLES * ITERATIONS * BPP);
+#endif
 
   test_start ();
   for (i=0;i<ITERATIONS && converged < BAIL_COUNT;i++)
@@ -214,6 +222,7 @@ main (gint    argc,
   }
   test_end ("sampler_get_fun linear", 1.0 * SAMPLES * ITERATIONS * BPP);
 
+#ifdef TEST_BUFFER_SAMPLE
   test_start ();
   for (i=0;i<ITERATIONS && converged < BAIL_COUNT;i++)
   {
@@ -230,6 +239,7 @@ main (gint    argc,
     test_end_iter();
   }
   test_end ("gegl_buffer_sample cubic", 1.0 * SAMPLES * ITERATIONS * BPP);
+#endif
 
   test_start ();
   for (i=0;i<ITERATIONS && converged < BAIL_COUNT;i++)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]