Wince lower triangle, logarithm, and exponential function optimization

Source: Internet
Author: User

In the previous article, <use wec7's neon internal function>, it discussed the possibility of using wec7's neon internal function for code optimization. This article describes how neon commands improve the efficiency of triangles, logarithm, and exponential functions.

I. Test Platform
1. CPU: Cortex-A8 1 GHz
2. OS: wince6r3
3. complier: 1. vs2005 2. wec7

2. Test code Link
1. http://gruntthepeon.free.fr/ssemath/neon_mathfun.html
2. http://blog.csdn.net/zht9961020/article/details/7232924

Iii. Test Results

sin .. ->    0.0 millions of vector evaluations/second -> 9900 cycles/valuecos .. ->    0.0 millions of vector evaluations/second -> 10750 cycles/valueexp .. ->    0.0 millions of vector evaluations/second -> 8300 cycles/valuelog .. ->    0.0 millions of vector evaluations/second -> 9075 cycles/valuecephes_sinf .. ->    0.5 millions of vector evaluations/second -> 457 cycles/valuecephes_cosf .. ->    0.4 millions of vector evaluations/second -> 503 cycles/valuecephes_expf .. ->    0.1 millions of vector evaluations/second -> 1835 cycles/valuecephes_logf .. ->    0.2 millions of vector evaluations/second -> 950 cycles/valuesin_ps .. ->    3.4 millions of vector evaluations/second ->  73 cycles/valuecos_ps .. ->    3.3 millions of vector evaluations/second ->  74 cycles/valuesincos_ps .. ->    3.5 millions of vector evaluations/second ->  70 cycles/valueexp_ps .. ->    7.2 millions of vector evaluations/second ->  35 cycles/valuelog_ps .. ->    5.8 millions of vector evaluations/second ->  43 cycles/valuemy_sin .. ->    0.5 millions of vector evaluations/second -> 431 cycles/valuemy_cos .. ->    0.4 millions of vector evaluations/second -> 590 cycles/value

Iv. Analysis
1. 1 ~ 4 is to use the system library function, 5 ~ 8 is another library used, 9 ~ 13 was optimized using Neon. These test branches all come from the first test code link.
2. 14 ~ 15 is another library used, from the second test code Link
From the results, neon optimization has obvious advantages.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.