Optimization/Assembly help on OSGPS Project

fniles@gnupooh.org fniles@gnupooh.org
Wed Sep 17 04:21:00 GMT 2008


Cliff Kelley and I have developed a Free Software GPS receiver over the
last few years.  It originally was a hardware based receiver, but now
we're excited about doing the correlations in software.  We've got the
entire correlator in integer math and I've try to optimize it the best I
can.  It runs about real-time now, but I was hoping someone with more
assembly expertise could take a look at it and see if we can't squeeze
some more speed out of it.  About six lines of code use about 99% of the
run time.  Seems like someone who could help us use a few special
instructions could really make a big impact.

The code is on sourceforge under the project "osgps".  The lines of code
in question are in the file correlator.c from about lines 220 to 228.

I can send you an input file, but you can also just make up some random
data to feed it as an input file just to test the speed.

Thanks,
Rick Niles.


Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total
 time   seconds   seconds    calls  Ts/call  Ts/call  name
 13.26      4.24     4.24                             Sim_GP2021_int
(correlator.c:220 @ 8056e9d)
  9.21      7.17     2.94                             Sim_GP2021_int
(correlator.c:224 @ 8056ec9)
  8.63      9.93     2.75                             Sim_GP2021_int
(correlator.c:212 @ 8056e68)
  7.63     12.37     2.44                             Sim_GP2021_int
(correlator.c:216 @ 8056e8e)
  6.45     14.43     2.06                             Sim_GP2021_int
(correlator.c:221 @ 8056eb8)
  6.36     16.45     2.03                             Sim_GP2021_int
(correlator.c:224 @ 8056ec3)
  6.14     18.41     1.96                             Sim_GP2021_int
(correlator.c:215 @ 8056e8a)
  5.14     20.05     1.64                             Sim_GP2021_int
(correlator.c:226 @ 8056ecc)
  4.40     21.46     1.41                             Sim_GP2021_int
(correlator.c:221 @ 8056eb2)
  3.66     22.63     1.17                             Sim_GP2021_int
(correlator.c:241 @ 8056f1c)
  3.60     23.78     1.15                             Sim_GP2021_int
(correlator.c:227 @ 8056ee1)
  3.15     24.79     1.00                             Sim_GP2021_int
(correlator.c:235 @ 8056f00)
  3.04     25.75     0.97                             Sim_GP2021_int
(correlator.c:220 @ 8056eb5)
  2.82     26.66     0.90                             Sim_GP2021_int
(correlator.c:265 @ 8057030)
  2.69     27.52     0.86                             Sim_GP2021_int
(correlator.c:225 @ 8056ed2)
  2.69     28.38     0.86                             Sim_GP2021_int
(correlator.c:237 @ 8056f11)
  2.49     29.17     0.80                             Sim_GP2021_int
(correlator.c:219 @ 8056e92)
  1.55     29.66     0.49                             Sim_GP2021_int
(correlator.c:227 @ 8056ee8)
  1.50     30.14     0.48                             Sim_GP2021_int
(correlator.c:231 @ 8056eee)
  1.33     30.57     0.42                             Sim_GP2021_int
(correlator.c:216 @ 8056e87)
  1.05     30.91     0.34                             Sim_GP2021_int
(correlator.c:219 @ 8056e77)
  1.05     31.24     0.34                             Sim_GP2021_int
(correlator.c:232 @ 8056ef6)




More information about the Gcc-help mailing list