Good Afternoon,

Here is a patch that eeks out a tiny performance boost for the fano decoder
in lib/wsprd/fano.c. It does two things:

   1.  It removes an ENCODE call when initializing the root node since
   encstate is set to zero so you know lsym will end up being zero.
   2. Since the ENCODE macro is operating on 32 bits (POLY1 and POLY2 are
   32 bits and the XOR based parity calcs are 32 bits) encstate in the node
   struct and _tmp in the ENCODE routine are changed to 32 bit integers
   (unsigned int), instead of unsigned long integers. This makes for slightly
   faster bitwise operations.

With these changes I'm getting the same amount of decodes a 0.6% decrease
in the time spent in the Fano decoder:

=== Original ===
69 decodes
   0.00    0.00    0.04    0.06    0.90   29.38    0.00   31.47

Code segment        Seconds   Frac
-----------------------------------
readwavfile           0.00    0.00
Coarse DT f0 f1       0.00    0.00
sync_and_demod(0)     0.04    0.00
sync_and_demod(1)     0.06    0.00
sync_and_demod(2)     0.90    0.03
Stack/Fano decoder   29.38    0.93
OSD        decoder    0.00    0.00
-----------------------------------
Total                31.47    1.00

=== New ===
69 decodes
   0.00    0.00    0.04    0.06    0.90   29.17    0.00   31.31

Code segment        Seconds   Frac
-----------------------------------
readwavfile           0.00    0.00
Coarse DT f0 f1       0.00    0.00
sync_and_demod(0)     0.04    0.00
sync_and_demod(1)     0.06    0.00
sync_and_demod(2)     0.90    0.03
Stack/Fano decoder   29.17    0.93
OSD        decoder    0.00    0.00
-----------------------------------
Total                31.31    1.00

Given that it has to do with what instructions are used for different word
sizes you might see more dramatic results on different architectures.

I've also attached the scripts I used to test it out.

On a related note, does anyone still have this dataset?

http://physics.princeton.edu/pulsar/K1JT/wspr_data.tgz

It would be nice to have some non-simulated data.

73,

Ryan N2BP

Attachment: test.sh
Description: Binary data

Attachment: generate.sh
Description: Binary data

Attachment: fano.patch
Description: Binary data

_______________________________________________
wsjt-devel mailing list
wsjt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wsjt-devel

Reply via email to