changeset 187:6ad363f7ea30

libgsmefr/d1035pf.c: perf opt
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 03 Jan 2023 03:22:04 +0000
parents 12d9d3649232
children 9b07190a6d08
files libgsmefr/d1035pf.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libgsmefr/d1035pf.c	Tue Jan 03 03:05:38 2023 +0000
+++ b/libgsmefr/d1035pf.c	Tue Jan 03 03:22:04 2023 +0000
@@ -41,8 +41,8 @@
         i = tmp & 7;                                    logic16 (); 
         i = dgray[i];                                   move16 (); 
 
-        i = extract_l (L_shr (L_mult (i, 5), 1));
-        pos1 = add (i, j); /* position of pulse "j" */
+        i *= 5;
+        pos1 = i + j; /* position of pulse "j" */
 
         i = shr (tmp, 3) & 1;                           logic16 (); 
         if (i == 0)
@@ -60,11 +60,11 @@
 
         i = index[add (j, 5)] & 7;                      logic16 (); 
         i = dgray[i];                                   move16 (); 
-        i = extract_l (L_shr (L_mult (i, 5), 1));
+        i *= 5;
 
-        pos2 = add (i, j);      /* position of pulse "j+5" */
+        pos2 = i + j;      /* position of pulse "j+5" */
 
-        if (sub (pos2, pos1) < 0)
+        if (pos2 < pos1)
         {
             sign = negate (sign);
         }