Keil Logo

C51: Dual Data Pointer Performance Increase

Information in this article applies to:

  • C51 Version 5.50 and later


How are the dual data pointers of the several 8051 derivatives used by the C compiler? What is the performance advantage?


In C51, only the library routines use the dual data pointers. The dual data pointers are not used by the C compiler to optimize your program code.

The following library routines use dual data pointers when copying or comparing 2 memory blocks:

  • memmove
  • memcpy
  • memcmp
  • strcpy
  • strcmp

There is a distinct performance advantage in using dual data pointers. As an example, we profiled the memcpy function. This function shows the best performance increase you can expect. The following table gives the performance increase by using dual data pointers on the Dallas Semiconductor 320. This is compared to the same speed 8051 CPU with only 1 data pointer.

memcpy 1 Byte         2.4x
memcpy 10 Bytes       3.3x
memcpy 100 Bytes      3.8x
memcpy 1000 Bytes     3.9x

Note that the Dallas part already runs 3 times faster than a standard 8051.


Last Reviewed: Thursday, February 25, 2021

Did this article provide the answer you needed?
Not Sure
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.