ermig1979 / Simd

C++ image processing and machine learning library with using of SIMD: SSE, AVX, AVX-512, AMX for x86/x64, VMX(Altivec) and VSX(Power7) for PowerPC, NEON for ARM.
http://ermig1979.github.io/Simd
MIT License
2.04k stars 407 forks source link

resize from (3328,1032) to (3752,1080) is slower than opencv4.5.1 #149

Closed zacario-li closed 3 years ago

zacario-li commented 3 years ago
Hi, cv::resize is much faster than simd::resize. Is there any problem? OS: Win10 Pro (1909) CPU: i7-10700 RAM: 32G method cost(s)
cv::resize 0.003689
simd::resize 0.009789
ermig1979 commented 3 years ago

Hi!

I think that main reason of this behavior is that Simd::Resize works at single thread but cv::resize uses multithreading.

P.S. OpenCV is developed to achieve maximal performance at work station and maximal uses multithreading to minimize function execution time for single user. I developed Simd to work in server environment: it works mainly in single thread and avoids internal algorithm multithreading in order to achieve maximal utilization of CPU resources at multithread using.

zacario-li commented 3 years ago

Hi!

I think that main reason of this behavior is that Simd::Resize works at single thread but cv::resize uses multithreading.

P.S. OpenCV is developed to achieve maximal performance at work station and maximal uses multithreading to minimize function execution time for single user. I developed Simd to work in server environment: it works mainly in single thread and avoids internal algorithm multithreading in order to achieve maximal utilization of CPU resources at multithread using.

Thanks for your explanation.

SheepKeeper1990 commented 2 years ago

Hi, First of all, thank you for your contribution. But when I used this library, I tested Simd:: Resize(),Simd:: BgrToGray and so on. Many functions are 4-6 times slower than OpenCV4.5.5. (OS: Ubuntu18.04 CPU: i7-10750H 12cores)

Did I miss anything when I used it? Could you give a use case of image processing to make it faster than opencv's function. If most of them are slower than opencv, what are the advantages of this library. Sincerely look forward to your answer.