[v3] Fix management of non empty hash functor

2012-12-13 Thread François Dumont
st. 2012-12-14 François Dumont * include/bits/hashtable_policy.h (_Local_iterator_base): Use _Hashtable_ebo_helper to embed necessary functors into the local_iterator. Pass information about functors involved in hash code by copy. * include/bits/hashtable.h (__cache_defau

Re: [v3] Fix management of non empty hash functor

2013-01-10 Thread François Dumont
some time changing typedef in using so I prefer to stick to this approach in this file, even if there are still some typedef left. Tested under linux x86_64 normal and debug modes. 2013-01-10 François Dumont * include/bits/hashtable_policy.h (_Local_iterator_base): Use _Hashtable_

Re: [v3] Fix management of non empty hash functor

2013-01-28 Thread François Dumont
Attached patch applied. 2013-01-28 François Dumont * include/bits/hashtable_policy.h (_Local_iterator_base): Use _Hashtable_ebo_helper to embed functors into the local_iterator when necessary. Pass information about functors involved in hash code by copy. * include/bits

Fwd: Re: Export _Prime_rehash_policy symbols

2013-02-01 Thread François Dumont
Test successful so attached patch applied. 2013-02-01 François Dumont * include/bits/hashtable_policy.h (_Prime_rehash_policy::_M_next_bkt) (_Prime_rehash_policy::_M_need_rehash): Move definition... * src/c++11/hashtable_c++0x.cc: ... here. * src/shared/hashtable-aux.cc

hasher speed traits

2013-02-02 Thread François Dumont
std::unordered_set default cache: second insert 3r3u0s 640mem0pf 41975.cc std::unordered_set default cache: erase from key 4r3u0s -640mem 0pf 2013-02-02 François Dumont * include/bits/functional_hash.h (std

Re: [PATCH, PR] Crash of Bessel functions at x==0!

2013-02-09 Thread François Dumont
Attached patch applied then. 2013-02-09 François Dumont * include/tr1/bessel_function.tcc (__cyl_bessel_ij_series): Code simplification. On 02/08/2013 08:46 PM, Paolo Carlini wrote: On 02/08/2013 07:08 PM, François Dumont wrote: Just a small remark, in bessel_function.tcc, the

Re: unordered containers doc

2013-02-11 Thread François Dumont
That's crystal clear. I think I can recognize one or two words from my original proposal like 'The' or 'in' :-) François On 02/11/2013 01:24 AM, Jonathan Wakely wrote: On 7 February 2013 21:01, François Dumont wrote: Thanks for taking care of it. Here is another

Re: [patch] fix libstdc++/56278

2013-02-13 Thread François Dumont
Committed then. 2013-02-13 François Dumont * include/bits/hashtable_policy.h (_Hash_code_base): Restore default constructor protected. * include/bits/hashtable.h: static assert that _Hash_code_base has a default constructor available through inheritance. On 02/13/2013 12:36

std::pair copy and move constructor

2013-02-15 Thread François Dumont
Hi I had a problem with the result of std::is_copy_assignable>::type which used to be true_type. So here is a patch to fix that. 2013-02-15 François Dumont * include/bits/stl_pair.h (pair): Use default implementation for copy and move constructors. * testsuite/20_u

Re: Enhance performance test

2011-11-06 Thread François Dumont
Attached patch applied. 2011-11-06 François Dumont * testsuite/performance/23_containers/insert_erase/41975.cc: Add tests to check performance with or without cache of hash code and with string type that has a costlier hash functor than int type. François On 11/05

Re: Value type of map need not be default copyable

2012-08-08 Thread François Dumont
On 08/08/2012 09:34 AM, Marc Glisse wrote: On Tue, 7 Aug 2012, Richard Smith wrote: I've attached a patch for unordered_map which solves the rvalue reference problem. For efficiency, I've created a new _M_emplace_bucket method rather than call emplace directly. I've verified all libstdc++ tes

Re: Value type of map need not be default copyable

2012-08-08 Thread François Dumont
On 08/08/2012 03:39 PM, Paolo Carlini wrote: On 08/08/2012 03:15 PM, François Dumont wrote: I have also introduce a special std::pair constructor for container usage so that we do not have to include the whole tuple stuff just for associative container implementations. To be clear: sorry

Re: Value type of map need not be default copyable

2012-08-09 Thread François Dumont
On 08/09/2012 10:35 AM, Paolo Carlini wrote: Hi, On 08/09/2012 09:14 AM, Marc Glisse wrote: On Wed, 8 Aug 2012, François Dumont wrote: On 08/08/2012 03:39 PM, Paolo Carlini wrote: On 08/08/2012 03:15 PM, François Dumont wrote: I have also introduce a special std::pair constructor for

Re: Value type of map need not be default copyable

2012-08-11 Thread François Dumont
ld make this header less dependent on , should I do so ? 2012-08-09 François Dumont Ollie Wild * include/bits/hashtable.h (_Hashtable<>_M_insert_multi_node(hash_code, node_type*)): New. (_Hashtable<>_M_insert(_Args&&, false_type)): Use latter. (_H

Re: Value type of map need not be default copyable

2012-08-12 Thread François Dumont
On 08/11/2012 03:47 PM, Marc Glisse wrote: On Sat, 11 Aug 2012, François Dumont wrote: Your remark on using std::move rather than std::forward Marc made sens but didn't work. I don't understand why but the new test is showing that std::forward works. If anyone can explain why

Re: Value type of map need not be default copyable

2012-08-13 Thread François Dumont
On 08/13/2012 02:10 PM, Paolo Carlini wrote: On 08/12/2012 10:00 PM, François Dumont wrote: Ok for trunk ? Ok, thanks! Paolo. PS: you may want to remove the trailing blank line of testsuite_counter_type.h Attached patch applied. 2012-08-13 François Dumont Ollie Wild

[v3] libstdc++/54296

2012-08-28 Thread François Dumont
_Hashtable implementation but finally preferred not to do so because it would imply re-computing hash code and add useless checks. 2012-08-28 François Dumont PR libstdc++/54296 * include/bits/hashtable.h (_M_erase(size_type, __node_base*, __node_type*)): New. (erase(const_iterator)):

Re: [v3] libstdc++/54296

2012-09-05 Thread François Dumont
On 09/05/2012 11:58 AM, Paolo Carlini wrote: Hi, On 09/04/2012 10:08 PM, François Dumont wrote: Hi I managed to do the test with Valgrind and so confirm the fix with the attached patch (unmodified since last proposal). Patch is Ok, thanks for your patience and thanks again for all your

PR 44436 Associative containers emplace/emplace_hint

2012-09-14 Thread François Dumont
value type to be default constructible. The C++11 status table was not signaling that those methods were missing so I didn't had to update it. 2012-09-14 François Dumont PR libstdc++/44436 * include/bits/stl_tree.h (_Rb_tree<>::_M_insert_): Take _Base_ptr

Fix code regression

2012-09-23 Thread François Dumont
, __ummap_hashtable. (unordered_map): Derive from __umap_hashtable. (unordered_multimap): Derive from __ummap_hashtable. * include/bits/unordered_set.h (__unordered_set): Remove. (__unordered_multiset): Remove. ... 2012-09-19 François Dumont * testsuite/performance

Re: PR 54075 Fix hashtable::reserve

2012-07-25 Thread François Dumont
Attached patch applied to trunk. I am building 4.7 branch to also apply the patch to this branch. 2012-07-25 François Dumont PR libstdc++/54075 * include/bits/hashtable.h (_Hashtable<>::_Hashtable(_InputIterator, _InputIterator, size_type, ...): Remo

Re: PR 54075 Fix hashtable::reserve

2012-07-26 Thread François Dumont
Attached patch applied on 4.7 branch. Tested under Linux x86_64. I will fix this small english issue in trunk ChangeLog. François On 07/26/2012 11:11 AM, Jonathan Wakely wrote: On 25 July 2012 21:29, François Dumont wrote: (_Hashtable<>::rehash): Likewise. Set _M_prev_resiz

Re: PR 54075 Restore 4.6 growth factor

2012-07-29 Thread François Dumont
Patch applied. I usually CC to gcc-patches when I signal that it has been applied. Should I send it all my patch proposals ? François On 07/28/2012 11:18 PM, Jonathan Wakely wrote: Please remember to CC gcc-patches too. On 28 July 2012 21:49, François Dumont wrote: Hi Here is the

_GLIBCXX_END_NAMESPACE_* invalid closure order

2012-07-30 Thread François Dumont
Even if it doesn't make any difference after preprocessing the attached patch fix the closure order in definition of _GLIBCXX_END_NAMESPACE_* macros. 2012-07-30 François Dumont * include/bits/c++config (_GLIBCXX_END_NAMESPACE_CONTAINER): Fix order of clo

Remove redundant comparison in debug mode

2012-08-01 Thread François Dumont
Verifying number of comparisons invoked in different algos and different modes I remarked this small performance issue. 2012-08-01 François Dumont * include/debug/functions.h (__check_partition_lower_aux): Remove redundant comparison with pivot value

Re: PR 53115

2012-05-01 Thread François Dumont
progress on this subject in the future. However I will have a try with Valgrind. I can only add comment in bugzilla so I let you set this issue as resolved. François I will have a run with Valgrind 2012-05-01 François Dumont PR libstdc++/53115 * include/bits/hashtable.h

Re: PR 53115

2012-05-02 Thread François Dumont
On 05/02/2012 06:23 PM, H.J. Lu wrote: On Tue, May 1, 2012 at 1:23 PM, François Dumont wrote: unordered_multilmap test added, attached patch applied to 4.7 branch and trunk. This bug was not so difficult to fix. It would even have been quite easy to detect with a good test coverage tool

Re: [v3] fix libstdc++/53263

2012-05-11 Thread François Dumont
Attached patch applied to trunk. 2012-05-11 François Dumont PR libstdc++/53263 * include/debug/safe_iterator.h (__gnu_debug::__base): Move... * include/debug/functions.h: ... Here. Add debug function overloads to perform checks on normal iterators when possible. * include

Re: Fix stable_sort to work on iterators returning rvalue

2012-05-29 Thread François Dumont
Attached patch applied then. 2012-05-29 François Dumont * include/bits/stl_tempbuf.h (__uninitialized_construct_buf) (__uninitialized_construct_buf_dispatch<>::__ucr): Fix to work with iterator returning rvalue. * testsuite/25_algorithms/stable_sort/3.cc: New. Françoi

Re: hashtable exception safety patch

2011-09-14 Thread François Dumont
. Thanks for your patience. Paolo Attached patch applied. 2011-09-14 François Dumont Paolo Carlini * include/bits/hashtable.h (_Hashtable<>::_M_rehash): Take and restore hash policy _M_prev_resize on exception. (_Hashtable<>::_M_insert_bucket):

Re: hash policy patch

2011-09-17 Thread François Dumont
o reduce the number of buckets... I should find the time to check C++11 about this. I'll let you know my opinion ASAP. Attached patch applied. 2011-09-17 François Dumont * include/bits/hashtable.h (_Hashtable<>::__rehash_policy(const _RehashPolicy&)): Commit the

Re: [v3] PR libstdc++/50529

2011-10-01 Thread François Dumont
On 09/29/2011 10:59 PM, Paolo Carlini wrote: Ok to commit ? Ok. These patches are going also to 4_6-branch. Paolo Attached patch applied, thanks Paolo for applying it to 4.6 branch. 2011-10-01 François Dumont * include/debug/vector (vector<>::erase(iterator, iterator):

Re: [v3] fix libstdc++/52476

2012-03-16 Thread François Dumont
Attached patch applied. 2012-03-16 François Dumont PR libstdc++/52476 * include/bits/hashtable.h (_Hashtable<>::_M_rehash_aux): Add. (_Hashtable<>::_M_rehash): Use the latter. * testsuite/23_containers/unordered_multimap/insert/5

Re: [v3] fix libstdc++/52476

2012-04-09 Thread François Dumont
Attached patch applied to 4_7-branch. 2012-04-09 François Dumont PR libstdc++/52476 * include/bits/hashtable.h (_Hashtable<>::_M_rehash_aux): Add. (_Hashtable<>::_M_rehash): Use the latter. * testsuite/23_containers/unordered_multimap/insert/5

Fwd: Re: hashtable cleanup + new testsuite files

2011-11-28 Thread François Dumont
Attached patch applied. 2011-11-29 François Dumont * include/bits/hashtable.h (_Hashtable<>::_M_rehash): Remove code useless now that the hashtable implementation put the hash code in cache if the hash functor throws. * testsuite/23_containers/unorder

Re: PR 51386

2011-12-07 Thread François Dumont
Attached patch applied: 2011-12-07 François Dumont PR libstdc++/51386 * include/bits/hashtable_policy.h (_Prime_rehash_policy::_M_next_bkt): Fix computation of _M_prev_resize so that hashtable do not keep on being rehashed when _M_max_load_factor is lower

Re: unordered containers emplace

2011-12-09 Thread François Dumont
Attached patch applied. 2011-12-09 François Dumont * include/bits/hashtable.h (_Hashtable<>::emplace, _Hashtable<>::emplace_hint): Add. * include/debug/unordered_set (unordered_set<>::emplace, unordered_set<>::emplace_hint, unord

Re: profile mode patch

2011-12-10 Thread François Dumont
Attached patch applied. 2011-12-12 François Dumont * include/profile/unordered_set: Minor formatting changes. (unordered_set<>::_M_profile_destruct, unordered_multiset<>::_M_profile_destruct): Fix implementation to not rely on normal implementa

Re: RE :Re: RE :Re: hashtable local iterator

2012-01-03 Thread François Dumont
Attached patch applied. 2012-01-03 François Dumont * include/bits/hashtable_policy.h (_Ebo_helper<>): Rename to the more specific _Hashtable_ebo_helper. Hide this implementation detail thanks to private inheritance. I was about to roll the ChangeLog but I sa

Re: [PATCH] hashtable insert enhancement

2012-01-13 Thread François Dumont
Attached patch applied. 2012-01-13 François Dumont * include/bits/hashtable_policy.h (_Hash_node_base): New, use it as base class of ... (_Hash_node, _Hash_node): ... those. * include/bits/hashtable.h (_Hashtable): Replace _M_begin_bucket_index by

Re: libstdc++/51866 too, sorry

2012-01-18 Thread François Dumont
Attached patch applied. 2012-01-18 François Dumont Roman Kononov PR libstdc++/51866 * include/bits/hashtable.h (_Hashtable<>::_M_insert(_Arg, false_type)): Do not keep a reference to a potentially moved instance. * testsuite/23_cont

[wwwdocs] libstdcxx_so_7-2-branch branch creation

2012-02-01 Thread François Dumont
Hello I have created yesterday the libstdcxx_so_7-2-branch in the gcc repo that only contains the libstdc++-v3 folder. This branch will contain all the abi breaking changes that are plan to be moved to trunk as soon as the decision to break the abi will have been taken. Paolo Carlini advi

Re: debug safe iterator patch

2012-02-06 Thread François Dumont
Attached patch applied 2012-02-06 François Dumont * include/debug/safe_iterator.h (_Safe_iterator::_M_before_dereferenceable): Avoid the expensive creation of a _Safe_iterator instance to do the check. François On 02/05/2012 06:30 PM, Paolo Carlini wrote: On 02/05

Re: [wwwdocs] libstdcxx_so_7-2-branch branch creation

2012-02-13 Thread François Dumont
++-v3) patches that break its abi. It will be merged into the trunk as soon as the decision to move to abi version 7 will have been taken. It is maintained by François Dumont and the official libstdc++-v3 maintainers Paolo Carlini, Benjamin Kosnik and Jonathan Wakely. I prefer to avoid the te

Re: [wwwdocs] libstdcxx_so_7-2-branch branch creation

2012-02-26 Thread François Dumont
to move to abi version 7 will have been taken. It is maintained by > mailto:frs.dum...@gmail.com";>François Dumont and the official > libstdc++-v3 maintainers Paolo Carlini, Benjamin Kosnik and Jonathan Wakely. > Patches will be marked with the tag [so_7-2] in the subject

Re: [so_7-2] DR 13631 patch

2012-03-01 Thread François Dumont
Here is what I have finally commited to libstdcxx_so_7-2 branch. 2012-03-01 François Dumont DR libstdc++/13631 * config/locale/gnu/messages_member.h, messages_member.cc: Prefer dgettext usage to gettext to allow usage of several catalogs at the same time. Add

Re: cleanup patch

2011-06-29 Thread François Dumont
Attached patch applied 2011-06-29 François Dumont * include/debug/set.h, unordered_map, multiset.h, forward_list, unordered_set, vector, deque, string, list, multimap.h: Remove base class default constructor calls. * include/debug/map.h: Likewise and cleanup

Re: safe unordered local iterators

2011-07-21 Thread François Dumont
Attached patch applied: 2011-07-21 François Dumont * include/debug/safe_unordered_sequence.h, safe_unordered_sequence.tcc: Rename respectively in... * include/debug/safe_unordered_container.h, safe_unordered_container.tcc: ...those. _Safe_unordered_sequence

Re: hash policy patch

2011-07-24 Thread François Dumont
On 07/24/2011 01:31 AM, Paolo Carlini wrote: On 07/23/2011 10:31 PM, François Dumont wrote: Hi While working on DR 41975 I realized a small issue in current rehash implementation that sometimes lead to load_factor being greater than max_load_factor. Here is a patch to fix that: Ok, good

Re: libstdc++.exp patch

2011-04-22 Thread François Dumont
Attached patch applied. 2011-04-21 François Dumont * testsuite/lib/libstdc++.exp (check_v3_target_time): Discard unused compilation result thanks to /dev/null. * testsuite/lib/libstdc++.exp (check_v3_target_debug_mode check_v3_target_profile_mode

Re: pb_ds debug mode patch

2011-05-11 Thread François Dumont
Attached patch applied. 2011-05-11 François Dumont * include/ext/pb_ds/detail/resize_policy/ hash_load_check_resize_trigger_imp.hpp (assert_valid): Replace _GLIBCXX_DEBUG_ASSERT calls with PB_DS_DEBUG_VERIFY. * include/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp

Re: [PATCH 3/5][_Hashtable] Avoid redundant usage of rehash policy

2024-10-13 Thread François Dumont
Here is a fresh rebased version. François On 04/01/2024 06:50, François Dumont wrote: Here is an updated version.     libstdc++: [_Hashtable] Avoid redundant usage of rehash policy     Bypass call to __detail::__distance_fwd and the check if rehash is needed when     instantiating from an

Re: [PATCH] Add fancy pointer support in std::map/set

2024-10-20 Thread François Dumont
On 17/10/2024 23:11, Jonathan Wakely wrote: On Thu, 17 Oct 2024 at 21:39, Jonathan Wakely wrote: On Thu, 17 Oct 2024 at 20:52, François Dumont wrote: Here is an updated version that compiles, I think, all your feedbacks. It's much cleaner indeed. T

Re: [PATCH v4] libstdc++: implement concatenation of strings and string_views

2024-10-20 Thread François Dumont
On 17/10/2024 11:13, Giuseppe D'Angelo wrote: Hello, Il 17/10/24 06:32, François Dumont ha scritto: As a side note you should provide your patches as .txt files so that any email client can render it without going through an editor. Apologies for that. Do you mean I should use text/

Re: [PATCH] libstdc++: Avoid using std::__to_address with iterators

2024-10-21 Thread François Dumont
Reasoning is perfectly fine to me. It's not a good news for me cause I plan to extend usages of __niter_base to many algos to limit impact of _GLIBCXX_DEBUG mode at runtime. If we have random access iterator we can be sure that __glibcxx_requires_valid_range fully validated the range and so we

Re: [PATCH v4] libstdc++: implement concatenation of strings and string_views

2024-10-16 Thread François Dumont
As a side note you should provide your patches as .txt files so that any email client can render it without going through an editor. And regarding the patch, I wonder what the std::move is for on the returned value ? Like this one: +    { +  return std::move(__lhs.append(__rhs)); +    }

Re: [PATCH] Add fancy pointer support in std::map/set

2024-10-17 Thread François Dumont
cator/ext_ptr.cc: New test case. Ok to commit ? François On 09/10/2024 00:02, Jonathan Wakely wrote: On Tue, 8 Oct 2024 at 22:50, Jonathan Wakely wrote: On Thu, 1 Aug 2024 at 18:28, François Dumont wrote: Hi Here is a proposal to add fancy pointer s

[Bug libstdc++/115285] [12/13/14/15 Regression] std::unordered_set can have duplicate value

2024-10-22 Thread François Dumont
Hi     libstdc++: Always instantiate key_type to compute hash code [PR115285]     Even if it is possible to compute a hash code from the inserted arguments     we need to instantiate the key_type to guaranty hash code consistency.     Preserve the lazy instantiation of the mapped_type in the

Re: [PATCH] Add fancy pointer support in std::map/set

2024-11-04 Thread François Dumont
On 21/10/2024 06:56, François Dumont wrote: On 17/10/2024 23:11, Jonathan Wakely wrote: On Thu, 17 Oct 2024 at 21:39, Jonathan Wakely wrote: On Thu, 17 Oct 2024 at 20:52, François Dumont wrote: Here is an updated version that compiles, I think, all your

Re: [PATCH] Add fancy pointer support in std::map/set

2024-11-04 Thread François Dumont
On 04/11/2024 19:45, Jonathan Wakely wrote: On Mon, 4 Nov 2024 at 18:30, François Dumont wrote: On 21/10/2024 06:56, François Dumont wrote: On 17/10/2024 23:11, Jonathan Wakely wrote: On Thu, 17 Oct 2024 at 21:39, Jonathan Wakely wrote: On Thu, 17 Oct 2024 at 20:52, François Dumont

Re: [Bug libstdc++/115285] [12/13/14/15 Regression] std::unordered_set can have duplicate value

2024-10-23 Thread François Dumont
Sorry but I'm not sure, is it also ok for the 3 backports ? On 22/10/2024 22:43, Jonathan Wakely wrote: On Tue, 22 Oct 2024 at 18:28, François Dumont wrote: Hi libstdc++: Always instantiate key_type to compute hash code [PR115285] Even if it is possible to compute a hash

[PATCH] Fix const constraint in std::stable_sort and std::inplace_merge

2024-09-25 Thread François Dumont
Hi Once https://gcc.gnu.org/pipermail/libstdc++/2024-September/059568.html will be accepted we will be able fix this long lasting issue that std::stable_sort and std::inplace_merge are forcing the functor to take const& parameters even when iterators used in range are not const ones. This pa

Re: [PATCH] Fix const constraint in std::stable_sort and std::inplace_merge

2024-10-03 Thread François Dumont
On 02/10/2024 19:07, Jonathan Wakely wrote: On Wed, 2 Oct 2024 at 17:39, Jonathan Wakely wrote: On Wed, 25 Sept 2024 at 18:22, François Dumont wrote: Hi Once https://gcc.gnu.org/pipermail/libstdc++/2024-September/059568.html will be accepted we will be able fix this long lasting issue

Re: [PATCH] libstdc++: Add debug assertions to std::list and std::forward_list

2024-11-18 Thread François Dumont
On 16/11/2024 02:18, Jonathan Wakely wrote: On Sat, 16 Nov 2024 at 01:09, Jonathan Wakely wrote: While working on fancy pointer support for the linked lists I noticed they didn't have any debug assertions. This adds the obvious non-empty assertions to front(), back(), pop_front() and pop_back

Re: [PATCH] libstdc++: Add debug assertions to std::list and std::forward_list

2024-11-18 Thread François Dumont
On 18/11/2024 19:24, François Dumont wrote: On 16/11/2024 02:18, Jonathan Wakely wrote: On Sat, 16 Nov 2024 at 01:09, Jonathan Wakely wrote: While working on fancy pointer support for the linked lists I noticed they didn't have any debug assertions. This adds the obvious non-

Re: [PATCH] Add fancy pointer support in std::map/set

2024-11-17 Thread François Dumont
ext_ptr.cc: New test case. Tested under Linux x64. Note that I've also run the 23_containers tests on map, multimap, multiset and set tweaking implementation so that new types are being used when C++11 or later even if allocator pointer type is a C pointer. Ok to commit ? François On

Re: [PATCH] libstdc++: Simplify _Hashtable merge functions

2024-11-13 Thread François Dumont
Sounds like a very good idea. Moreover friend declaration could be limited to another _Hashtable<> type with same _Key, _Value and _Alloc types to be compatible. On 08/11/2024 11:33, Jonathan Wakely wrote: On Thu, 7 Nov 2024 at 22:18, Jonathan Wakely wrote: I realised that _M_merge_unique an

Re: [PATCH] Add fancy pointer support in std::map/set

2024-12-08 Thread François Dumont
On 04/12/2024 22:48, Jonathan Wakely wrote: On 04/12/24 19:27 +0100, François Dumont wrote: Hi I've completed the synchronization with your equivalent PR for std::list so here is the updated patch. PR updated a couple of days ago. Note that I've started to rework the patch for t

Re: [PATCH 2/2][libstdc++]: Adjust probabilities of hashmap loop conditions

2024-12-30 Thread François Dumont
Sorry to react so late on this patch. I'm only surprised by the expected result of the added __builtin_expect which is 0. It means that we consider that hasher is not perfect, we have several entries in the same bucket. Shouldn't we reward those that are spending time on their hasher to make it a

[PATCH] Use __builtin_addressof in std::addressof

2024-12-18 Thread François Dumont
Hi As proposed on another thread here is the patch to make std::__addressof and std::addressof compile time equivalent. Maybe not entirely because of the [[__nodiscard__]] on std::addressof but still closer.     libstdc++: Have std::addressof use __builtin_addressof     Rather than calling

Re: [PATCH] Add fancy pointer support in std::map/set

2024-12-14 Thread François Dumont
Hi Here is an update with the alloc ptr specific tests and so fixes. PR updated: https://forge.sourceware.org/gcc/gcc-TEST/pulls/27 François On 09/12/2024 07:05, François Dumont wrote: On 04/12/2024 22:48, Jonathan Wakely wrote: On 04/12/24 19:27 +0100, François Dumont wrote: Hi I&#x

[PATCH][_Hashtable] Fix hash code cache usage

2025-01-20 Thread François Dumont
Hi In my work on fancy pointer support I've decided to always cache the hash code. Doing so I spotted a bug in the management of this cache when hash functor is stateful.     libstdc++: [_Hashtable] Fix hash code cache usage when hash functor is stateful     It is wrong to reuse a cached

Re: [PATCH] Simplify _Hashtable::_M_merge_multi

2025-02-17 Thread François Dumont
On 16/02/2025 23:14, Jonathan Wakely wrote: On Sun, 16 Feb 2025 at 21:15, François Dumont wrote: Hi A minor simplification. libstdc++: Simplify _Hashtable::_M_merge_multi When merging two hashtable instances of the same type we do not need to go through _M_src_hash_code that also check for

[PATCH] Simplify _Hashtable::_M_merge_multi

2025-02-16 Thread François Dumont
Hi A minor simplification. libstdc++: Simplify _Hashtable::_M_merge_multi When merging two hashtable instances of the same type we do not need to go through _M_src_hash_code that also check for identical Hash functor type. libstdc++-v3/ChangeLog:     * include/bits/hashtable.h (_Hashtabl

Re: [PATCH][_Hashtable] Fix hash code cache usage

2025-02-24 Thread François Dumont
iners/unordered_map/modifiers/merge.cc (test10): New     test case. Tested under Linux x64. Ok to commit ? François On 19/02/2025 14:33, Jonathan Wakely wrote: On 20/01/25 22:12 +0100, François Dumont wrote: Hi In my work on fancy pointer support I've decided to always cache

Re: Fix 'libstdc++-v3/src/c++20/tzdb.cc' build for '__GTHREADS && !__GTHREADS_CXX0X' configurations

2025-02-23 Thread François Dumont
On 20/02/2025 18:28, Thomas Schwinge wrote: Hi! On 2025-02-20T16:36:56+, Jonathan Wakely wrote: On 20/02/25 15:50 +0100, Thomas Schwinge wrote: >From 820e015494e25187c9a5ffbd69911ec6ce612789 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 20 Feb 2025 14:08:11 + Subject: [

Re: [PATCH][_Hashtable] Fix hash code cache usage

2025-02-17 Thread François Dumont
Ping for this bug fix, would you like a PR ? On 20/01/2025 22:12, François Dumont wrote: Hi In my work on fancy pointer support I've decided to always cache the hash code. Doing so I spotted a bug in the management of this cache when hash functor is stateful.     libstdc++: [_Hash

Re: [PATCH] Simplify _Hashtable::_M_merge_multi

2025-02-27 Thread François Dumont
For the record, this small change have been committed as part of another larger one: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=bcc8dea6a45b46febfa76df6f5e3e5b13f3b4a58 On 19/02/2025 13:49, Jonathan Wakely wrote: On Mon, 17 Feb 2025 at 11:59, François Dumont wrote: On 16/02/2025 23:14

Re: [PATCH v2] libstdc++: Add P1206R7 from_range members to ordered sets [PR111055]

2025-03-17 Thread François Dumont
On 17/03/2025 09:21, Tomasz Kamiński wrote: This is another piece of P1206R7, adding new members to std::set and std::multiset. PR libstdc++/111055 libstdc++-v3/ChangeLog: * include/bits/stl_multiset.h: (inser_range) (multiset(from_range_t, _Rg&&, const _Compare&, con

[PATCH] Activate __cpp_lib_ranges_to_container test

2025-03-19 Thread François Dumont
Hi Now that __cpp_lib_ranges_to_container support have been added to std::set we can activate those checks.     libstdc++: Activate a __cpp_lib_ranges_to_container dependent test     Now that std::set has support for __cpp_lib_ranges_to_container we can     activate a test using it in a fancy

[PATCH] Move std::search into algobase.h

2023-05-31 Thread François Dumont via Gcc-patches
libstdc++: Reduce inclusion to Move the std::search definition from stl_algo.h to stl_algobase.h and use the later in . For consistency also move std::__parallel::search and associated helpers from to so that std::__parallel::search is accessible along with std::search. libstdc++-v3/Cha

Re: [PATCH] Move std::search into algobase.h

2023-06-01 Thread François Dumont via Gcc-patches
On Thu, 1 Jun 2023 at 12:52, Rainer Orth > wrote: > >> Jonathan Wakely via Gcc-patches writes: >> >> > On Wed, 31 May 2023 at 18:39, François Dumont via Libstdc++ < >> > libstd...@gcc.gnu.org> wrote: >> > >> >> libstdc++: Reduce in

Re: [PATCH] Move std::search into algobase.h

2023-06-01 Thread François Dumont via Gcc-patches
P and try to rebuild lib to reproduce the failure. To be continued tomorrow... On 01/06/2023 14:05, Jonathan Wakely wrote: On Thu, 1 Jun 2023 at 12:52, Rainer Orth wrote: Jonathan Wakely via Gcc-patches writes: > On Wed, 31 May 2023 at 18:39, François Dumont via Libstdc++ <

Re: [PATCH] Move std::search into algobase.h

2023-06-02 Thread François Dumont via Gcc-patches
de.cc:     Add { dg-require-effective-target omp }.     * testsuite/17_intro/headers/c++2014/parallel_mode.cc: Likewise.     * testsuite/17_intro/headers/c++2017/parallel_mode.cc: Likewise. Ok to commit ? On 01/06/2023 23:57, Jonathan Wakely wrote: On Thu, 1 Jun 2023, 21:37 Fra

Re: [PATCH] Move std::search into algobase.h

2023-06-02 Thread François Dumont via Gcc-patches
Ok, push done. Even after full rebuild those tests are still UNRESOLVED on my system. Yes, I also noticed that I could remove this check. I'll propose it later. François On 02/06/2023 09:43, Jonathan Wakely wrote: On Fri, 2 Jun 2023 at 08:33, François Dumont wrote: I haven't

Re: [committed] libstdc++: Update list of known symbol versions for abi-check

2023-06-06 Thread François Dumont via Gcc-patches
On 06/06/2023 17:59, Jonathan Wakely via Libstdc++ wrote: Tested x86_64-linux and powerpc64le-linux. Pushed to trunk. -- >8 -- Add the recently added CXXABI_1.3.15 version. Also remove two "frozen" versions from the latestp list, as no more symbols should be added to those now. libstdc++-v3/

Re: [PATCH v4 2/6] libstdc++: use new built-in trait __is_reference for std::is_reference

2023-06-12 Thread François Dumont via Gcc-patches
Same remark for all your alike patches. On 11/06/2023 04:43, Ken Matsui via Libstdc++ wrote: This patch gets std::is_reference to dispatch to new built-in trait __is_reference. libstdc++-v3/ChangeLog: * include/std/type_traits (is_reference): Use __is_reference built-in trait.

Re: [PATCH v5 6/6] libstdc++: make std::is_object dispatch to new built-in traits

2023-06-13 Thread François Dumont via Gcc-patches
On 13/06/2023 00:22, Ken Matsui via Libstdc++ wrote: This patch gets std::is_object to dispatch to new built-in traits, __is_function, __is_reference, and __is_void. libstdc++-v3/ChangeLog: * include/std/type_traits (is_object): Use new built-in traits, __is_function, __is_refe

[PATCH] Reimplement __gnu_cxx::__ops operators

2023-06-14 Thread François Dumont via Gcc-patches
I think we all agree that __gnu_cxx::__ops needed to be reimplemented, here it is. Note that I kept the usage of std::ref in , and .     libstdc++: Reimplement __gnu_cxx::__ops operators     Replace functors using iterators as input to adopt functors that     are matching the same Standard ex

Re: [PATCH 1/2] c++, libstdc++: implement __is_pointer built-in trait

2023-07-11 Thread François Dumont via Gcc-patches
On 10/07/2023 07:23, Ken Matsui via Libstdc++ wrote: This patch implements built-in trait for std::is_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __is_pointer. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_POINTER. * semantics.cc (trait_expr_value): Likew

Re: [PATCH v2 1/3] c++, libstdc++: Implement __is_arithmetic built-in trait

2023-07-16 Thread François Dumont via Gcc-patches
On 15/07/2023 06:55, Ken Matsui via Libstdc++ wrote: This patch implements built-in trait for std::is_arithmetic. gcc/cp/ChangeLog: * cp-trait.def: Define __is_arithmetic. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_ARITHMETIC. * semantics.cc (trait_expr_valu

Re: [PATCH v2 2/3] libstdc++: Optimize is_arithmetic performance by __is_arithmetic built-in

2023-07-16 Thread François Dumont via Gcc-patches
On 15/07/2023 06:55, Ken Matsui via Libstdc++ wrote: This patch optimizes the performance of the is_arithmetic trait by dispatching to the new __is_arithmetic built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_arithmetic): Use __is_arithmetic built-in trait.

Re: [PATCH v2 3/3] libstdc++: Optimize is_fundamental performance by __is_arithmetic built-in

2023-07-16 Thread François Dumont via Gcc-patches
On 15/07/2023 06:55, Ken Matsui via Libstdc++ wrote: This patch optimizes the performance of the is_fundamental trait by dispatching to the new __is_arithmetic built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_fundamental_v): Use __is_arithmetic built-in tr

Re: [PATCH v2 2/3] libstdc++: Optimize is_arithmetic performance by __is_arithmetic built-in

2023-07-22 Thread François Dumont via Gcc-patches
On 17/07/2023 06:48, Ken Matsui wrote: On Sun, Jul 16, 2023 at 5:32 AM François Dumont wrote: On 15/07/2023 06:55, Ken Matsui via Libstdc++ wrote: This patch optimizes the performance of the is_arithmetic trait by dispatching to the new __is_arithmetic built-in trait. libstdc++-v3

Re: [PATCH v2 3/3] libstdc++: Optimize is_fundamental performance by __is_arithmetic built-in

2023-07-22 Thread François Dumont via Gcc-patches
at 9:49 PM Ken Matsui wrote: On Sun, Jul 16, 2023 at 5:41 AM François Dumont wrote: On 15/07/2023 06:55, Ken Matsui via Libstdc++ wrote: This patch optimizes the performance of the is_fundamental trait by dispatching to the new __is_arithmetic built-in trait. libstdc++-v3/ChangeLog:

Re: [PATCH v3 1/3] c++, libstdc++: Implement __is_arithmetic built-in trait

2023-07-22 Thread François Dumont via Gcc-patches
On 18/07/2023 08:27, Ken Matsui via Libstdc++ wrote: This patch implements built-in trait for std::is_arithmetic. gcc/cp/ChangeLog: * cp-trait.def: Define __is_arithmetic. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_ARITHMETIC. * semantics.cc (trait_expr_valu

[PATCH][Hashtable] Performance optimization through use of insertion hint

2023-07-24 Thread François Dumont via Gcc-patches
    libstdc++: [_Hashtable] Make more use of insertion hint     When inserting an element into an empty bucket we currently insert the new node     after the before-begin node so in first position. The drawback of doing this is     that we are forced to update the bucket that was containing th

[committed] Fix several preprocessor directives

2023-07-30 Thread François Dumont via Gcc-patches
Committed as obvious.     libstdc++: Fix several preprocessor directives     A wrong usage of #define in place of a #error seems to have been replicated     at different places in source files.     libstdc++-v3/ChangeLog:     * src/c++11/compatibility-ldbl-facets-aliases.h: Replace

[committed] libstdc++: Remove obsolete comment in

2022-07-09 Thread François Dumont via Gcc-patches
   libstdc++: Remove obsolete comment in header     The comment is obsolete because char_traits.h do not include stl_algobase.h     anymore and stl_algobase.h is included directly from a few lines     below.     libstdc++-v3/ChangeLog:     * include/std/string: Remove obsolete comm

[PATCH] Complete __gnu_debug::basic_string Standard conformity

2022-07-10 Thread François Dumont via Gcc-patches
Here is a first patch to complete __gnu_debug::basic_string Standard conformity. I prefer to submit this before checking for more missing stuff to check that my proposal of having a testsuite_string.h header is ok. I also noticed some problems with _GLIBCXX_DEBUG_PEDANTIC.     libstdc++: Com

<    3   4   5   6   7   8   9   10   11   >