Skip to content

runtime performance of ucorrelate is disappointing #4

@tritemio

Description

@tritemio

Issue moved from tritemio#7. Original author @Phillip-M-Feldman.

  • Pycorrelate version: 0.3
  • Python version: 3.6
  • Operating System: Windows 10

Description

I wrote a script to compare the runtime perforance of numpy.correlate and pycorrelate.ucorrelate. The input sequences have length 1e5, and the maximum lag of interest is 10,000. Since I can't specify a maximum lag with numpy.correlate, I used the mode='same' option.

Although numpy.correlate does the full cross-correlation, and was thus expected to be much slower, the results showed that it is actually faster (the following test results are based on 10 iterations in each case):

elapsed (wall time) | user CPU | system CPU

      numpy:  37.03 | 141.09   |   6.92
pycorrelate: 106.91 |  55.62   |  51.78

I'm wondering if you have any thoughts re. why the elapse time is worse for pycorrelate.ucorrelate. Also, have you considering using FFTs to speed up the calculations?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions