This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Theoretically calculate the code (python code) execution time and number of cycles in ARM Cortex-A53 SoC processor

Hi, I want to calculate the execution time and the number of cycles for the small set of code (python code). Currently, I am working with Raspberry Pi 3B (ARM Cortex-A53 SoC processor) and writing a python code. Now, I have to calculate execution time as well as a number of cycles for a small set of code. For example:

 

a = 10

b = 10

print("Sum ", (a+b))

Parents
  • IMNSHO, this is nearly impossible.  (for example, it'd depend on which version of Python you're using, and print() speed would also depend on which version of an operating system you are running and where you are printing to, and whether you want to include the time that it takes the characters to actually appear before the user, or just how long it takes the output to go into some operating system buffer where it will be "eventually displayed for the user.")

    (In any case, "print" is likely to be far, far slower than the assignments and the addition.)

Reply
  • IMNSHO, this is nearly impossible.  (for example, it'd depend on which version of Python you're using, and print() speed would also depend on which version of an operating system you are running and where you are printing to, and whether you want to include the time that it takes the characters to actually appear before the user, or just how long it takes the output to go into some operating system buffer where it will be "eventually displayed for the user.")

    (In any case, "print" is likely to be far, far slower than the assignments and the addition.)

Children