The tag has no usage guidance.

learn more… | top users | synonyms

22
votes
11answers
808 views

Is it always wrong to optimize before profiling? [duplicate]

I see the mantra of "profiling before optimization" repeated again and again here, on SO, and elsewhere. Although I certainly use profiling tools, I'm only occasionally surprised by the results. It ...
6
votes
1answer
673 views

How to see what parts of your code are run most often?

I would like to be able to see what code in thousands of lines of source code is run most often and takes the longest. The purpose of this would be for optimization. Being able to see what parts of ...
4
votes
3answers
695 views

Interpreting profiling results

I am practicing algorithm and data structures. Therefore, I keep profiling my programs. Here is an example output from gprof: Each sample counts as 0.01 seconds. % cumulative self ...
7
votes
2answers
178 views

When profiling a function for time use, what information is desirable?

I'm writing a program similar to Python's timeit module. The idea is to time a function by executing it anywhere from 10 to 100,000 times depending on how long it takes and then report results. I've ...
6
votes
1answer
521 views

Conditional attribute in XML - most concise solution?

I am tasked with setting up conditional profiling - a method of tagging chunks of XML with an attribute, which will then be used as a conditional value to extract subset of that XML. Have a look at ...