The PICs I am working on have limited (1Mhz to 4Mhz clock) cycles, and I am wondering if C is going to waste a substantial amount of time executing. Has anyone ever had experience with both and could share some thoughts on the comparison?
C
The PICs I am working on have limited (1Mhz to 4Mhz clock) cycles, and I am wondering if C is going to waste a substantial amount of time executing. Has anyone ever had experience with both and could share some thoughts on the comparison?
C
I program using both.
C code generates ASM, therefore C code can't perform better than ASM because in the end you end up with the same thing. ie the chip will not run ASM generated by C quicker.
What your asking is what is better, Apples or Oranges.
Saying that C code is generates faster code is because the person who did it is not that great at witting ASM code, or saying ASM is smaller that C is because the person doing it dose not know who to get the best out of C.
Its down to the engineer and the skills they have. So I write in C or ASM or Mix depending on my project and what I want from it.
Assess your project and what is important for it, then decide if you are better at writing your code in C or ASM or both. If you select components and micros with the same critical eye, then you should be applying the same to how you write your code and not what public option is - because they have chosen based on thier project and own skill sets.
Paul
I program using both.
C code generates ASM, therefore C code can't perform better than ASM because in the end you end up with the same thing. ie the chip will not run ASM generated by C quicker.
What your asking is what is better, Apples or Oranges.
Saying that C code is generates faster code is because the person who did it is not that great at witting ASM code, or saying ASM is smaller that C is because the person doing it dose not know who to get the best out of C.
Its down to the engineer and the skills they have. So I write in C or ASM or Mix depending on my project and what I want from it.
Assess your project and what is important for it, then decide if you are better at writing your code in C or ASM or both. If you select components and micros with the same critical eye, then you should be applying the same to how you write your code and not what public option is - because they have chosen based on thier project and own skill sets.
Paul