romanz / amodem

Audio MODEM Communication Library in Python
Other
965 stars 121 forks source link

Profile and optimize decoder performance #10

Closed romanz closed 10 years ago

romanz commented 10 years ago
         7730425 function calls (7730314 primitive calls) in 19.586 seconds

   Ordered by: internal time
   List reduced from 764 to 20 due to restriction <20>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
  1320083    5.825    0.000    5.825    0.000 {numpy.core._dotblas.dot}
   769760    2.802    0.000    7.806    0.000 ./sampling.py:60(_sample)
   769760    2.303    0.000    2.303    0.000 ./sampling.py:27(get)
   174768    1.836    0.000   17.075    0.000 ./sigproc.py:52(decode)
   195099    1.639    0.000    1.639    0.000 {numpy.core.multiarray.array}
   194888    1.188    0.000   11.720    0.000 ./common.py:56(iterate)
   769760    1.093    0.000    8.899    0.000 ./sampling.py:55(next)
   176536    0.442    0.000   14.650    0.000 ./sigproc.py:13(__call__)
     5140    0.270    0.000    0.524    0.000 /usr/local/lib/python2.7/dist-packages/reedsolo.py:110(gf_poly_eval)
  1305560    0.247    0.000    0.247    0.000 /usr/local/lib/python2.7/dist-packages/reedsolo.py:80(gf_mul)
   174760    0.223    0.000   11.488    0.000 ./common.py:82(_gen)
   174760    0.208    0.000    0.292    0.000 ./recv.py:172(error_handler)
   174760    0.204    0.000    0.204    0.000 {method 'argmin' of 'numpy.ndarray' objects}
   192440    0.183    0.000   12.271    0.000 ./sigproc.py:97(extract_symbols)
        1    0.182    0.182    0.392    0.392 ./sampling.py:10(__init__)
        1    0.146    0.146    0.195    0.195 /usr/lib/python2.7/dist-packages/numpy/lib/function_base.py:2795(sinc)
   174761    0.145    0.000   17.267    0.000 ./recv.py:167(demodulate)
   174760    0.121    0.000    0.324    0.000 /usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py:741(argmin)
      514    0.077    0.000   17.344    0.034 {method 'extend' of 'bitarray._bitarray' objects}
   174800    0.059    0.000    0.059    0.000 {method 'setdefault' of 'dict' objects}
romanz commented 10 years ago
         7730425 function calls (7730314 primitive calls) in 19.586 seconds

   Ordered by: cumulative time
   List reduced from 764 to 30 due to restriction <30>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.002    0.002   19.587   19.587 ./recv.py:2(<module>)
        1    0.001    0.001   19.530   19.530 ./recv.py:241(main)
      514    0.006    0.000   17.893    0.035 ./ecc.py:32(decode)
      515    0.005    0.000   17.349    0.034 ./recv.py:229(blocks)
      514    0.077    0.000   17.344    0.034 {method 'extend' of 'bitarray._bitarray' objects}
   174761    0.145    0.000   17.267    0.000 ./recv.py:167(demodulate)
   174768    1.836    0.000   17.075    0.000 ./sigproc.py:52(decode)
   176536    0.442    0.000   14.650    0.000 ./sigproc.py:13(__call__)
   192440    0.183    0.000   12.271    0.000 ./sigproc.py:97(extract_symbols)
   194888    1.188    0.000   11.720    0.000 ./common.py:56(iterate)
   174760    0.223    0.000   11.488    0.000 ./common.py:82(_gen)
   769760    1.093    0.000    8.899    0.000 ./sampling.py:55(next)
   769760    2.802    0.000    7.806    0.000 ./sampling.py:60(_sample)
  1320083    5.825    0.000    5.825    0.000 {numpy.core._dotblas.dot}
   769760    2.303    0.000    2.303    0.000 ./sampling.py:27(get)
   195099    1.639    0.000    1.639    0.000 {numpy.core.multiarray.array}
        1    0.000    0.000    1.495    1.495 ./recv.py:211(receive)
        3    0.005    0.002    1.067    0.356 ./common.py:109(take)
        1    0.001    0.001    0.915    0.915 ./recv.py:128(train_receiver)
      514    0.009    0.000    0.537    0.001 /usr/local/lib/python2.7/dist-packages/reedsolo.py:195(rs_correct_msg)
      514    0.002    0.000    0.526    0.001 /usr/local/lib/python2.7/dist-packages/reedsolo.py:136(rs_calc_syndromes)
     5140    0.270    0.000    0.524    0.000 /usr/local/lib/python2.7/dist-packages/reedsolo.py:110(gf_poly_eval)
        1    0.002    0.002    0.394    0.394 ./loop.py:25(__init__)
        1    0.182    0.182    0.392    0.392 ./sampling.py:10(__init__)
   174760    0.121    0.000    0.324    0.000 /usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.py:741(argmin)
   174760    0.208    0.000    0.292    0.000 ./recv.py:172(error_handler)
  1305560    0.247    0.000    0.247    0.000 /usr/local/lib/python2.7/dist-packages/reedsolo.py:80(gf_mul)
   174760    0.204    0.000    0.204    0.000 {method 'argmin' of 'numpy.ndarray' objects}
        1    0.146    0.146    0.195    0.195 /usr/lib/python2.7/dist-packages/numpy/lib/function_base.py:2795(sinc)
        1    0.000    0.000    0.186    0.186 ./recv.py:96(receive_prefix)
romanz commented 10 years ago

Make sure that QAM.decode() is correct.

romanz commented 10 years ago

Running in realtime on PC/laptop.