2013/11/23 Óscar Fuentes <[email protected]>
> Ruben Van Boxem <[email protected]>
> writes:
>
> > The libstdc++ online documentation keeps a list here:
> > http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html
> >
> > This should correspond fairly well to what is available on any platform.
> Of
> > course, there may be deviations (e.g. <thread>, and std::to_string in the
> > past). If you find any, please notify this list as it's something that
> > should be solved then :-)
>
> Thanks Ruben. Here goes the case that motivated my inquiry:
>
> The code snippet below shows that <chrono> does not work. Using
> boost::chrono yields more reasonable results.
>
>
> #include <iostream>
> #include <vector>
> #include <chrono>
>
> int main() {
> for (unsigned long long size = 1; size < 10000000; size *= 10) {
> auto start = std::chrono::steady_clock::now();
> std::vector<int> v(size, 42);
> auto end = std::chrono::steady_clock::now();
> auto elapsed = end - start;
> std::cout << size << ": " << elapsed.count() << '\n';
> }
> }
>
>
> Compiled with "g++ -std=c++11". Output:
>
> 1: 0
> 10: 0
> 100: 0
> 1000: 0
> 10000: 0
> 100000: 0
> 1000000: 15626000
>
>
> MinGW-W64 x86 g++ 4.8.2 from package
> i686-4.8.2-release-win32-dwarf-rt_v3-rev0.7z on Windows XP SP3 32bits.
>
This is comparable to the output I get from VS2013. So I would say this is
a quality of implementation issue (wrt the resolution of the clock used).
I doubt though that this is nonconformant. I didn't look up the exact
chrono requirements in the standard though.
What exactly do you think is "broken" here beyond a bad resolution?
Cheers,
Ruben
>
>
> ------------------------------------------------------------------------------
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing
> conversations that shape the rapidly evolving mobile landscape. Sign up
> now.
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> _______________________________________________
> Mingw-w64-public mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public