diff options
author | Rasmus Munk Larsen <rmlarsen@google.com> | 2020-05-08 15:41:50 -0700 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2020-05-08 15:41:50 -0700 |
commit | c1d944dd913d05180b7d2d1229072c9c52a11f29 (patch) | |
tree | 80a936a6403af21079445e000c897c7357c122bf /test/packetmath.cpp | |
parent | 5c4e19fbe7ea19d9d8b51243515f972237a49267 (diff) |
Remove packet ops pinsertfirst and pinsertlast that are only used in a single place, and can be replaced by other ops when constructing the first/final packet in linspaced_op_impl::packetOp.
I cannot measure any performance changes for SSE, AVX, or AVX512.
name old time/op new time/op delta
BM_LinSpace<float>/1 1.63ns ± 0% 1.63ns ± 0% ~ (p=0.762 n=5+5)
BM_LinSpace<float>/8 4.92ns ± 3% 4.89ns ± 3% ~ (p=0.421 n=5+5)
BM_LinSpace<float>/64 34.6ns ± 0% 34.6ns ± 0% ~ (p=0.841 n=5+5)
BM_LinSpace<float>/512 217ns ± 0% 217ns ± 0% ~ (p=0.421 n=5+5)
BM_LinSpace<float>/4k 1.68µs ± 0% 1.68µs ± 0% ~ (p=1.000 n=5+5)
BM_LinSpace<float>/32k 13.3µs ± 0% 13.3µs ± 0% ~ (p=0.905 n=5+4)
BM_LinSpace<float>/256k 107µs ± 0% 107µs ± 0% ~ (p=0.841 n=5+5)
BM_LinSpace<float>/1M 427µs ± 0% 427µs ± 0% ~ (p=0.690 n=5+5)
Diffstat (limited to 'test/packetmath.cpp')
-rw-r--r-- | test/packetmath.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/test/packetmath.cpp b/test/packetmath.cpp index 7341d67e7..c7732e6e6 100644 --- a/test/packetmath.cpp +++ b/test/packetmath.cpp @@ -288,26 +288,6 @@ template<typename Scalar,typename Packet> void packetmath() } } - if (PacketTraits::HasInsert || g_vectorize_sse) { - // pinsertfirst - for (int i=0; i<PacketSize; ++i) - ref[i] = data1[i]; - Scalar s = internal::random<Scalar>(); - ref[0] = s; - internal::pstore(data2, internal::pinsertfirst(internal::pload<Packet>(data1),s)); - VERIFY(test::areApprox(ref, data2, PacketSize) && "internal::pinsertfirst"); - } - - if (PacketTraits::HasInsert || g_vectorize_sse) { - // pinsertlast - for (int i=0; i<PacketSize; ++i) - ref[i] = data1[i]; - Scalar s = internal::random<Scalar>(); - ref[PacketSize-1] = s; - internal::pstore(data2, internal::pinsertlast(internal::pload<Packet>(data1),s)); - VERIFY(test::areApprox(ref, data2, PacketSize) && "internal::pinsertlast"); - } - { for (int i = 0; i < PacketSize; ++i) { // "if" mask |