Git Product home page Git Product logo

Comments (3)

marton78 avatar marton78 commented on August 20, 2024 1

OK, I checked the sources and you are right, the ordering in the results of pffft[d]_transform of course depends on SIMD packet size. If performance is paramount for your use case, you could reverse engineer the code of pffft[d]_zreorder and write a function with the signature pffft[d]_extract(SETUP_STRUCT *setup, const float *in, int index, float *out, pffft_direction_t direction); which extracts the i'th value of pffft[d]_transform's results.

from pffft.

marton78 avatar marton78 commented on August 20, 2024

Yes, I can confirm your results on Apple M1. @hayguen can you see anything obviously wrong here?

Without SIMD:

% clang -Ilib pffft/pf*.c test.cpp -o test && ./test

result=3443.696594
Success.

With SIMD:

% clang -Ilib pffft/pf*.c test.cpp -o test -DPFFFT_ENABLE_NEON=1 && ./test

result=3793.724228
Success.

from pffft.

jsommr avatar jsommr commented on August 20, 2024

Got it!

I changed all three pffftd_transform to pffftd_transform_ordered. Now the results are exactly the same.

If I measure yin_pitch with gcc using the provided code without compiler optimizations (-Ox) I get:

SIMD disabled: ~3600 μs
SIMD enabled:  ~2400 μs

But with -O3 the results are roughly the same at around ~1000 μs. Anyways, it's all really fast and your library works great.

Thanks for taking the time to verify the issue.

from pffft.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.