The std::min, std::max, and std::minmax overloads that take a
std::initializer_list all require that the list is not empty. The attached
patch adds debug mode checks for this.
Thanks,
Eelis
Index: libstdc++-v3/include/debug/formatter.h
On 2016-06-22 05:25, David Malcolm wrote:
Clang has an option -fdiagnostics-parseable-fixits, which emits a
machine-readable version of the fixits, for use by IDEs. (The only
IDE I know of that supports this format is Xcode [1]; does anyone
know of other IDEs supporting this? I'd be very happy
On 2016-09-02 20:20, Eelis van der Weegen wrote:
On 2016-08-31 14:45, Jonathan Wakely wrote:
Is this significantly faster than just using
uniform_int_distribution<_IntType>{0, __bound - 1}(__g) so we don't
need to duplicate the logic? (And people maintaining the code won't
recon
On 2016-05-01 16:18, Eelis wrote:
The attached patch optimizes std::shuffle for the very common case
where the generator range is large enough that a single invocation
can produce two swap positions.
This reduces the runtime of the following testcase by 37% on my machine:
Gentle ping. :) Did
_distribution when the generator's
range is large enough, which is almost always the case. This helps a lot,
because
std::uniform_int_distribution::op() recomputes scaling factors every time.
Thoughts?
Thanks,
Eelis
Index: libstdc++
Please ignore this, I made the error described here:
https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Implementation_errors
:)
On 2016-04-30 21:15, Eelis wrote:
Hi,
The attached patch makes std::shuffle about 33% faster for the following
testcase:
#include
#include
<< v.front() << '\n';
}
Thoughts?
Thanks,
Eelis
Index: libstdc++-v3/include/bits/stl_algo.h
===
--- libstdc++-v3/include/bits/stl_algo.h (revision 235680)
+++ libstdc++-v3/include/bits/stl_algo.h (working cop
Sorry, forgot to include the libstdc++ list.
On 2016-05-01 16:18, Eelis wrote:
Hi,
The attached patch optimizes std::shuffle for the very common case
where the generator range is large enough that a single invocation
can produce two swap positions.
This reduces the runtime of the following
Looks like a typo. :)
Index: libstdc++-v3/include/std/shared_mutex
===
--- libstdc++-v3/include/std/shared_mutex (revision 226840)
+++ libstdc++-v3/include/std/shared_mutex (working copy)
@@ -331,7 +331,7 @@
void lock() { _M_im
std::uninitialized_copy tries to test assignability as follows:
is_assignable<_ValueType1, _RefType>::value
This is the wrong way around. For example, when the iterators are char*, this
ends up as
is_assignable::value
which is false. It should be
is_assignable::value
which is tr
On 2015-01-09 19:03, Jonathan Wakely wrote:
The attached patch should be correct.
Tested x86_64-linux, committed to trunk and 4.9.
Awesome, thanks!
On 2016-02-23 23:39, Jonathan Wakely wrote:
On 23/02/16 22:03 +0100, Eelis wrote:
The std::min, std::max, and std::minmax overloads that take a
std::initializer_list all require that the list is not empty. The attached
patch adds debug mode checks for this.
Nice, thanks for the patch.
Hi
On 2016-09-01 17:14, Jonathan Wakely wrote:
On 31/08/16 13:45 +0100, Jonathan Wakely wrote:
On 03/05/16 16:42 +0200, Eelis van der Weegen wrote:
Ah, thanks, I forgot to re-attach when I sent to include the libstdc++ list.
On 2016-05-03 14:38, Jonathan Wakely wrote:
ENOPATCH
On 1 May 2016 at
On 2016-08-31 14:45, Jonathan Wakely wrote:
Is this significantly faster than just using
uniform_int_distribution<_IntType>{0, __bound - 1}(__g) so we don't
need to duplicate the logic? (And people maintaining the code won't
reconvince themselves it's correct every time they look at it :-)
[..]
This is the same optimization as was recently applied to std::shuffle.
It reduces the runtime of the following program by 20% on my machine:
int main()
{
std::vector a(1), b(1000);
std::mt19937 gen;
uint64_t c = 0;
Ah, thanks, I forgot to re-attach when I sent to include the libstdc++ list.
On 2016-05-03 14:38, Jonathan Wakely wrote:
ENOPATCH
On 1 May 2016 at 15:21, Eelis wrote:
Sorry, forgot to include the libstdc++ list.
On 2016-05-01 16:18, Eelis wrote:
Hi,
The attached patch optimizes std
16 matches
Mail list logo