This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/50661] std::equal should use more efficient version for arrays of pointers
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 08 Oct 2011 07:35:25 +0000
- Subject: [Bug libstdc++/50661] std::equal should use more efficient version for arrays of pointers
- Auto-submitted: auto-generated
- References: <bug-50661-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50661
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-10-08 07:35:25 UTC ---
Depends if pointer comparison on the architecture is the same as comparing
integer of the same size and if the alignment of the pointer is the same as its
size and all bits are significant.
E.g. you can't optimize std::equal of say long double that way (e.g. on x86_64
there are 6 bytes of padding in it), but not even float/double (+/-0). Not
sure e.g. on s390 31-bit if pointer comparison includes the topmost bit or not.