CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22
  1. #16
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    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.

  2. #17
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: Performance enhancement

    How big is "large" here?

  3. #18
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Performance enhancement

    Quote Originally Posted by Lindley View Post
    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.

  4. #19
    Join Date
    Jan 2006
    Posts
    384

    Re: Performance enhancement

    Quote Originally Posted by Lindley View Post
    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.

  5. #20
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    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.

  6. #21
    Join Date
    Jan 2006
    Posts
    384

    Re: Performance enhancement

    Quote Originally Posted by GCDEF View Post
    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 ?

  7. #22
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Performance enhancement

    Quote Originally Posted by humble_learner View Post
    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.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured