Search:

Type: Posts; User: petry

Search: Search took 0.00 seconds.

  1. Replies
    17
    Views
    11,699

    I decided too quickly. I looked for more info on...

    I decided too quickly. I looked for more info on binary_search and it works only in sorted array. It worked in my case while the array was not sorted, but it's not stable solution.

    Since sorting...
  2. Replies
    17
    Views
    11,699

    I only need to check if an element exists no need...

    I only need to check if an element exists no need to keep the order. I made a new test including set and Daved's suggestion, the results are below:

    Filesize: 14mb
    Lines: 1.050.000
    Average line...
  3. Replies
    17
    Views
    11,699

    I only to search through the elements, no need to...

    I only to search through the elements, no need to access by key.
  4. Replies
    17
    Views
    11,699

    I have just tested the difference. Filesize:...

    I have just tested the difference.

    Filesize: 8mb
    Lines: 700.000
    Average line length: 15 characters

    Time to fill:
    vector: 3843ms
    string: 3891ms
  5. Replies
    17
    Views
    11,699

    std::string::find vs std::find

    Hi All:

    I have a large number of elements to be stored into vector or basic string(delimited by \n). I need to search for an element and I would like to know what is faster:

    A:

    std::string...
Results 1 to 5 of 5