time...to multiply
anyone know offhand how long the C/C++ function exp() takes
compared to a recursive function?
anyone know offhand how long the C/C++ function exp() takes
when it''s a power of two compared to multiplying only?
I know I know, measure time before and after, but I''m
always interested in seeing how mid to high level language
functions are transformed into low level machine code
Create.
You can make MSVC, and most other compilers too, generate a text file with the asm code in it that you can review, for both debug and release builds. Whenever I''m curious I just pop open the Disammebly debug window.
...
You can use the RTDSC op code on modern pentiums to time how long anything takes in CPU clock ticks. Keep in mind that this will include any time spent in another thread if you get swapped out and when the CPU handles any interrupts.
Recursion generally blows, it''s usefulness is in the high-level trees, not in algorithms.
Magmai Kai Holmlor
- Not For Rent
...
You can use the RTDSC op code on modern pentiums to time how long anything takes in CPU clock ticks. Keep in mind that this will include any time spent in another thread if you get swapped out and when the CPU handles any interrupts.
Recursion generally blows, it''s usefulness is in the high-level trees, not in algorithms.
|
Magmai Kai Holmlor
- Not For Rent
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement