No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Is method B any faster than method A below? I have legacy code written with method A and I need to know if there would be a performance increase if I modified it to use method B or is it just semantics? **Method A (Using pointer)** for(vector<TriggerAlgorithm*>::iterator it = _pTrigs.begin(); … |
|
I like to have the name of the current method for logging purposes. For example: string Commands::test(StringTokenizer& tokens) { static string src("Commands::test"); ... _log.debug("message", src); } I'm worried that creating 'src' might cause a performance hit. I made the string static thinking it would only be constructed once, the first … |
|
I want to re-use a vector<short> over and over in a performance critical loop. I only need the vector **size** to be reset to zero at the end of the loop. I'm worried that the myVector.clear() takes time to actually clear all the memory. Also, does the myVector.reserve() survive the … |
|
Does Eclipse CDT (C++) produce a file that lists the symbols and addresses of the linked program? Thanks! |
|
I've programmed a lot with C but just started a new job using C++. If you could point me in the right direction, I would appreciate it. I made a bare-bones example that shows my problem. Here's what I'm trying to do in words: I have a class called 'Top' … |