The number of cycles/second is not directly related to the number of cycles required for a particular action. In any case, you many be interested in examining the 'assembly'-dump of such a C program/function or looking at the function ABI / calling conventions to give a general idea of the different steps that are applied; and then there is the work done inside the function itself ..
- user2864740
that will depend a lot on the yielded assembly and CPU - if num_1 and num_2 are not in cache it might take more (usually will)
- Random Dev
1 Answers
-1
votes
No. consider the function call sleep(5000) which causes your code to pause for 5 seconds. That would take more than 1 clock cycle.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more
num_1andnum_2are not in cache it might take more (usually will) - Random Dev