Boost logo

Boost Users :

Subject: Re: [Boost-users] Backend of multi_index container
From: degski (degski_at_[hidden])
Date: 2016-06-27 02:07:02

On 27 June 2016 at 08:50, Anaswara Nair <anaswara.nn_at_[hidden]> wrote:

> The execution time includes the time to read the data from the file and
> insert it to the container.

 So start timing after you loaded the file. The way you load the file might
affect the load-time. std::iostreams might not give the best performance,
and is obviously highly affected by hardware, STL-implementation and
underlying OS.

Also I am using std::chrono to calculate the time.

Use std::chrono::high_resolution_clock.

> Is there some other way by which I can pause the calculation when data is
> read from the file and resume it again only when data is inserted to the
> container?

You could just keep a running total and pause and resume as appropriate for
your measurement, adding the individual measurements to the total time.

It all smells a bit of premature optimization to me.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at