|
-
September 14th, 2009, 09:37 AM
#16
Re: Performance enhancement
1) add more memory to your computer or use a database
2) Read the first record, move the file pointer to the end of the file and read the last record.
-
September 14th, 2009, 11:12 AM
#17
Re: Performance enhancement
-
September 14th, 2009, 11:22 AM
#18
Re: Performance enhancement
 Originally Posted by Lindley
How big is "large" here?
And even more importantly, we still seem to be looking for solutions without first really knowing what the problem is. It's pretty freaking obvious when your computer is low on physical memory and starts caching. If that were really what was happening, I doubt we'd need a thread about it and hopefully a competent programmer would identify it right away.
-
September 16th, 2009, 08:51 AM
#19
Re: Performance enhancement
 Originally Posted by Lindley
You may not have control over the STL implementation, but you do have control over how you use it. Nine times out of ten, perceived "STL slowness" is merely due to suboptimal usage.
Can you please provide some hints towards what could be sub-optimal usage of STL libraries ? Are there some tricks or points that need to be considered ?
One of the problems that we realizing was the choice of collection classes - we realized that using vectors instead of lists did enhance performance when accessing data because of it's random access capabilities.
-
September 16th, 2009, 09:02 AM
#20
Re: Performance enhancement
Yes, that's the sort of thing I'm talking about. Even though STL does a lot for you "behind the scenes", you still need to know in rough terms what it's doing, so that you can judge whether the capabilities of a particular container are ideal for you.
Stuff like, don't pass containers by value, should be pretty obvious but also qualifies.
-
September 22nd, 2009, 01:34 AM
#21
Re: Performance enhancement
 Originally Posted by GCDEF
No way to tell without understanding the inner workings of the app.
I'd run a profiler and see which parts of the code were taking the most time, then look at them to see what can be improved.
Is Rational Quantify a good tool to use as a profiler in case I want to profile C++ code for performance ?
-
September 22nd, 2009, 07:17 AM
#22
Re: Performance enhancement
 Originally Posted by humble_learner
Is Rational Quantify a good tool to use as a profiler in case I want to profile C++ code for performance ?
I don't know. I would assume so. I've always used the one that comes with Visual Studio.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|