[gegl] over: replace for loop with while loop



commit c5fa2a1b7e6eb5996b7300f5efc1e701394c25bc
Author: Ãyvind KolÃs <pippin gimp org>
Date:   Sat Mar 24 16:21:57 2012 +0000

    over: replace for loop with while loop
    
    Over is important enough that we want to squeeze all possible performance out
    of it.

 operations/common/over.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/operations/common/over.c b/operations/common/over.c
index 092af65..eadbdce 100644
--- a/operations/common/over.c
+++ b/operations/common/over.c
@@ -56,7 +56,7 @@ process (GeglOperation        *op,
   if (aux==NULL)
     return TRUE;
 
-  for (i = 0; i < n_pixels; i++)
+  while (n_pixels--)
     {
       out[0] = aux[0] + in[0] * (1.0f - aux[3]);
       out[1] = aux[1] + in[1] * (1.0f - aux[3]);



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