C language commands must be compiled by the compiler to be recognized and executed by the hardware. Compilers are divided into front-end, middle-end and back-end.
The front-end deals with programs written in various computer languages, and the back-end is connected to the basic instruction set of the processor.
Therefore, if you use C programming, to achieve the highest efficiency, it is best to understand the C compiler used.
First, test the number of assembly language statements corresponding to each C language compilation, so that you can clearly know the efficiency.
In the future programming, use the statements with the highest compilation efficiency, so that you can ensure that the same function and different C programs have the highest compilation efficiency when programming the single-chip microcomputer C.
However, there are certain differences between different C compilers. The code length and execution time of an excellent embedded system C compiler are only 5-20% longer than the same function written in assembly language,
so the compilation efficiency of C compilers from different manufacturers will also be different.
Previous article:How to measure the stability of the system when developing a single-chip microcomputer system
Next article:What are the problems of software anti-interference in embedded development? How to solve them?
Recommended ReadingLatest update time:2024-11-16 13:33
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [Project source code] [Modelsim FAQ] vsim-3033 Instantiation of 'xxxx' failed
- micropython update: 2020.12
- Collaborative SI-PI-EMI Simulation of Chip-Package-System (CPS)
- [Sipeed LicheeRV 86 Panel Review] The board is not responding
- Use stm32l452 to drive hts221 and stts751 routine
- [National Technology N32WB452 Review] + Basic Function Usage
- Will demand for SiC FETs increase in the future?
- Problems with pressure maintenance of testing machine
- Testing a battery-powered product with a 26K resistor between the battery pads (no battery is soldered at this time!),...
- When TMS320F28377D runs CLA, it shows that Cla1Task2 does not contain frame information