CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Time consumed_

  1. #1
    Join Date
    Apr 2003
    Posts
    893

    Time consumed_

    If I use vector class's functions to search my data, could you tell
    me how I will know how fast its predefined algorithms will be. In order to be more precise about what I mean, if we, for instance, write a certain kind of algorithm to perform the searching task, we can compute the time taken for its performance, something like T(n^2) or T(nlogn),etc, but if it is already defined functions, how can we compute it ?

    Thank you very much...
    Regards,
    Nina.

  2. #2
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Time consumed_

    Originally posted by hometown
    If I use vector class's functions to search my data, could you tell
    me how I will know how fast its predefined algorithms will be. In order to be more precise about what I mean, if we, for instance, write a certain kind of algorithm to perform the searching task, we can compute the time taken for its performance, something like T(n^2) or T(nlogn),etc, but if it is already defined functions, how can we compute it ?

    Thank you very much...
    Regards,
    Nina.
    The search time for a vector is (and must be) linear -- O(n).

    Regards,

    Paul McKenzie

  3. #3
    Join Date
    Apr 2003
    Posts
    893

    Smile Thank you Sir very much...

    Regards,

    Nina.

  4. #4
    Join Date
    May 2000
    Location
    Phoenix, AZ [USA]
    Posts
    1,347
    I just want to add that a good reference source will allow you to
    look up this information yourself. One such source is "The C++
    Standard Library" by Nicolai M Josuttis.

  5. #5
    Join Date
    Apr 2003
    Posts
    893

    Smile Thank you Sir very much...

    Regards,
    Nina.

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