I have a function that is ungodly slow, what can I do to figure out what part of the function is taking so long?
I have a function that is ungodly slow, what can I do to figure out what part of the function is taking so long?
Use a profiling tool.
For GCC based compilers, it's called 'gprof'
Which OS/Compiler do you have?
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I really should put that in my sig...
Win XP, MSVC 6.0
MSVC 6.0 - Procedures for Performance Tuning
gg