public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/107929] New: std::experimental::simd needs to be reimplemented with GCC's vector extension
@ 2022-11-30  3:52 unlvsur at live dot com
  2022-11-30  3:54 ` [Bug libstdc++/107929] " unlvsur at live dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: unlvsur at live dot com @ 2022-11-30  3:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107929

            Bug ID: 107929
           Summary: std::experimental::simd needs to be reimplemented with
                    GCC's vector extension
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: unlvsur at live dot com
  Target Milestone: ---

https://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html

It is just too slow to compile by including immintrin.h headers. Using vector
extension is extremely easy to implement and more direct.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libstdc++/107929] std::experimental::simd needs to be reimplemented with GCC's vector extension
  2022-11-30  3:52 [Bug libstdc++/107929] New: std::experimental::simd needs to be reimplemented with GCC's vector extension unlvsur at live dot com
@ 2022-11-30  3:54 ` unlvsur at live dot com
  2022-11-30 20:16 ` mkretz at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: unlvsur at live dot com @ 2022-11-30  3:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107929

cqwrteur <unlvsur at live dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |unlvsur at live dot com

--- Comment #1 from cqwrteur <unlvsur at live dot com> ---
copy_from and copy_to can be implemented with __builtin_memcpy

https://github.com/cppfastio/fast_io/blob/b55c940d59ea70eb6c644d2c71d157a7d53a8df6/include/fast_io_core_impl/simd/gcc_clang.h#L52

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libstdc++/107929] std::experimental::simd needs to be reimplemented with GCC's vector extension
  2022-11-30  3:52 [Bug libstdc++/107929] New: std::experimental::simd needs to be reimplemented with GCC's vector extension unlvsur at live dot com
  2022-11-30  3:54 ` [Bug libstdc++/107929] " unlvsur at live dot com
@ 2022-11-30 20:16 ` mkretz at gcc dot gnu.org
  2022-11-30 22:00 ` unlvsur at live dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mkretz at gcc dot gnu.org @ 2022-11-30 20:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107929

Matthias Kretz (Vir) <mkretz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
                 CC|                            |mkretz at gcc dot gnu.org
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #2 from Matthias Kretz (Vir) <mkretz at gcc dot gnu.org> ---
std::experimental::simd has always been implemented with GCC's vector
extension. Also copy_from and copy_to are implemented with __builtin_memcpy.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libstdc++/107929] std::experimental::simd needs to be reimplemented with GCC's vector extension
  2022-11-30  3:52 [Bug libstdc++/107929] New: std::experimental::simd needs to be reimplemented with GCC's vector extension unlvsur at live dot com
  2022-11-30  3:54 ` [Bug libstdc++/107929] " unlvsur at live dot com
  2022-11-30 20:16 ` mkretz at gcc dot gnu.org
@ 2022-11-30 22:00 ` unlvsur at live dot com
  2022-12-01 10:07 ` mkretz at gcc dot gnu.org
  2022-12-01 18:52 ` unlvsur at live dot com
  4 siblings, 0 replies; 6+ messages in thread
From: unlvsur at live dot com @ 2022-11-30 22:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107929

--- Comment #3 from cqwrteur <unlvsur at live dot com> ---
(In reply to Matthias Kretz (Vir) from comment #2)
> std::experimental::simd has always been implemented with GCC's vector
> extension. Also copy_from and copy_to are implemented with __builtin_memcpy.

The problem is that the compilation speed are very slow. immintrin.h header
should not be included

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libstdc++/107929] std::experimental::simd needs to be reimplemented with GCC's vector extension
  2022-11-30  3:52 [Bug libstdc++/107929] New: std::experimental::simd needs to be reimplemented with GCC's vector extension unlvsur at live dot com
                   ` (2 preceding siblings ...)
  2022-11-30 22:00 ` unlvsur at live dot com
@ 2022-12-01 10:07 ` mkretz at gcc dot gnu.org
  2022-12-01 18:52 ` unlvsur at live dot com
  4 siblings, 0 replies; 6+ messages in thread
From: mkretz at gcc dot gnu.org @ 2022-12-01 10:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107929

--- Comment #4 from Matthias Kretz (Vir) <mkretz at gcc dot gnu.org> ---
I agree that compilation speed is a problem. However,

1. GCC's vector extensions are not sufficient (especially for use of AVX-512
masks)

2. I see 0.6s difference between calling `g++ -O2 -march=skylake` on an empty
file vs. a file that #includes <immintrin.h>. Whereas #include
<experimental/simd> takes about 2.7s.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug libstdc++/107929] std::experimental::simd needs to be reimplemented with GCC's vector extension
  2022-11-30  3:52 [Bug libstdc++/107929] New: std::experimental::simd needs to be reimplemented with GCC's vector extension unlvsur at live dot com
                   ` (3 preceding siblings ...)
  2022-12-01 10:07 ` mkretz at gcc dot gnu.org
@ 2022-12-01 18:52 ` unlvsur at live dot com
  4 siblings, 0 replies; 6+ messages in thread
From: unlvsur at live dot com @ 2022-12-01 18:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107929

--- Comment #5 from cqwrteur <unlvsur at live dot com> ---
1. the real gap is much larger due to larger preprocessor space.
2. that is just an excuse. the mm_xxxx intrinsic is implemented with builtin
functions on gcc and clang. You can always avoid include that header by using
builtin functions. There is no reason to include headers.
3. You really need that to support none x86 none arm platforms

Get Outlook for Android<https://aka.ms/AAb9ysg>
________________________________
From: mkretz at gcc dot gnu.org <gcc-bugzilla@gcc.gnu.org>
Sent: Thursday, December 1, 2022 5:07:42 AM
To: unlvsur@live.com <unlvsur@live.com>
Subject: [Bug libstdc++/107929] std::experimental::simd needs to be
reimplemented with GCC's vector extension

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107929

--- Comment #4 from Matthias Kretz (Vir) <mkretz at gcc dot gnu.org> ---
I agree that compilation speed is a problem. However,

1. GCC's vector extensions are not sufficient (especially for use of AVX-512
masks)

2. I see 0.6s difference between calling `g++ -O2 -march=skylake` on an empty
file vs. a file that #includes <immintrin.h>. Whereas #include
<experimental/simd> takes about 2.7s.

--
You are receiving this mail because:
You are on the CC list for the bug.
You reported the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-12-01 18:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-30  3:52 [Bug libstdc++/107929] New: std::experimental::simd needs to be reimplemented with GCC's vector extension unlvsur at live dot com
2022-11-30  3:54 ` [Bug libstdc++/107929] " unlvsur at live dot com
2022-11-30 20:16 ` mkretz at gcc dot gnu.org
2022-11-30 22:00 ` unlvsur at live dot com
2022-12-01 10:07 ` mkretz at gcc dot gnu.org
2022-12-01 18:52 ` unlvsur at live dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).