role of hand-optimized assembly in multimedia encoders

By: RichardC (tich.delete@this.pobox.com), November 18, 2020 3:42 pm
Room: Moderated Discussions
Dummond D. Slow (mental.delete@this.protozoa.us) on November 18, 2020 11:06 am wrote:

> I already said that elsewhere: autovectorization mostly fails on the kind of integer SIMD routines the
> encoders use. It is generally considered not remotely usable for encoders. One reason is that to get
> the performance, you usually can't just SIMDify naively, it needs some restructuring and transformation
> of the computation to get the kinds of speedups assembly does. It's probably not the only factor.

In general, to get close to the highest possible performance, you may need to change
the data layout to match the access patterns needed for the particular ISA to work
well in the critical inner loops.

But the C and C++ language standards specify the data layout of classes/struct's and
arrays, so they simply aren't allowed to do the kinds of optimizations that are needed.
And they also constrain the sequence of operations in awkward ways, though there are
often kludges to get round that.

Autovectorization is inescapably half-assed. To do a really good job of optimization,
you would need to start from a specification in a language with a higher level of abstraction which doesn't over-constrain the data layout.

This is precisely the kind of thing that happens in generating optimized code for
database query evaluation or ML inference, where you're starting from a much more
abstract specification of the computation.
< Previous Post in ThreadNext Post in Thread >
TopicPosted ByDate
1st round of M1 GPU benchmarksMaynard Handley2020/11/16 12:46 PM
  1st round of M1 GPU benchmarksAdrian2020/11/16 01:02 PM
    1st round of M1 GPU benchmarksI_vs2020/11/17 01:18 AM
  1st round of M1 GPU benchmarksRType2020/11/16 01:06 PM
    1st round of M1 GPU benchmarksMaynard Handley2020/11/16 01:45 PM
      And the NZ'ers are first to deliver cinebench scoresMaynard Handley2020/11/16 02:58 PM
        And the NZ'ers are first to deliver cinebench scoresWill2020/11/16 03:30 PM
          re: "scaling"Dummond D. Slow2020/11/16 04:06 PM
            re: "scaling"Maynard Handley2020/11/16 04:29 PM
              re: "scaling"Dummond D. Slow2020/11/16 04:51 PM
                re: "scaling"Maynard Handley2020/11/16 05:51 PM
                  re: "scaling"Dummond D. Slow2020/11/16 06:22 PM
                    re: "scaling"Maynard Handley2020/11/16 06:23 PM
                      re: "scaling"Maynard Handley2020/11/16 06:27 PM
                        re: "scaling"Dummond D. Slow2020/11/16 06:37 PM
                          re: "scaling"Chester2020/11/16 08:25 PM
                          Actual power consumption values.Dummond D. Slow2020/11/17 07:05 AM
                    re: "scaling"Doug S2020/11/17 10:25 AM
                      Apple loses a lot by not having turbo and SMTDummond D. Slow2020/11/17 11:18 AM
                        Apple loses a lot by not having turbo and SMTDoug S2020/11/17 12:21 PM
                          Apple loses a lot by not having turbo and SMTblaine2020/11/19 05:18 PM
                            Apple loses a lot by not having turbo and SMTDummond D. Slow2020/11/19 05:31 PM
                        Apple loses a lot by not having turbo and SMTTJ2020/11/18 01:10 AM
                          Cinebench is NOT a representation of average workloadsAndrei F2020/11/18 05:21 AM
                            SPEC is NOT a representation of average workloadsChester2020/11/18 07:02 AM
                              SPEC is NOT a representation of average workloadsDummond D. Slow2020/11/18 07:17 AM
                                SPEC is NOT a representation of average workloadsnone2020/11/18 08:18 AM
                                  x264 without SIMD is nonsenseDummond D. Slow2020/11/18 08:31 AM
                                  SPEC is NOT a representation of average workloadsMaynard Handley2020/11/18 09:13 AM
                                    SPEC is NOT a representation of average workloadsDummond D. Slow2020/11/18 09:21 AM
                                      SPEC is NOT a representation of average workloadsWilco2020/11/18 09:42 AM
                                        role of hand-optimized assembly in multimedia encodersDummond D. Slow2020/11/18 11:06 AM
                                          role of hand-optimized assembly in multimedia encodersdifferent anon2020/11/18 01:27 PM
                                            role of hand-optimized assembly in multimedia encodersDummond D. Slow2020/11/18 02:47 PM
                                              role of hand-optimized assembly in multimedia encodersDummond D. Slow2021/05/18 12:29 PM
                                          role of hand-optimized assembly in multimedia encodersRichardC2020/11/18 03:42 PM
                                          role of hand-optimized assembly in multimedia encodersnone2020/11/19 07:17 AM
                                      SPEC is NOT a representation of average workloadsnone2020/11/18 10:14 AM
                                        SPEC is NOT a representation of average workloadsDummond D. Slow2020/11/18 11:17 AM
                                      SPEC is NOT a representation of average workloadsMaynard Handley2020/11/18 11:03 AM
                                        SPEC is NOT a representation of average workloadsDummond D. Slow2020/11/18 11:25 AM
                                          SPEC is NOT a representation of average workloadsMaynard Handley2020/11/18 12:03 PM
                                            SPEC is NOT a representation of average workloadsDummond D. Slow2020/11/18 02:57 PM
                                              SPEC is NOT a representation of average workloadsMaynard Handley2020/11/18 04:36 PM
                                                SPEC is NOT a representation of average workloadsDummond D. Slow2020/11/18 04:50 PM
                                                  SPEC is NOT a representation of average workloadsDoug S2020/11/19 09:13 AM
                                                    SPEC is NOT a representation of average workloads-.-2020/11/19 02:34 PM
                                                    SPEC is NOT a representation of average workloadsDummond D. Slow2020/11/19 02:35 PM
                                              SPEC is NOT a representation of average workloadsEtienne Lorrain2020/11/19 04:04 AM
                                                SPEC is NOT a representation of average workloadsDummond D. Slow2020/11/19 05:58 AM
                                SPEC is NOT a representation of average workloadsChester2020/11/18 02:06 PM
                                  about bitratesDummond D. Slow2020/11/18 03:04 PM
                                    about bitratesChester2020/11/19 02:45 PM
                                  SPEC is NOT a representation of average workloadsOok2020/11/18 03:05 PM
                                    SPEC is NOT a representation of average workloadsDummond D. Slow2020/11/18 03:21 PM
                                  SPEC is NOT a representation of average workloadsNoSpammer2020/11/19 06:48 AM
                              SPEC is NOT a representation of average workloadsAndrei F2020/11/18 07:44 AM
                                SPEC is NOT a representation of average workloadsDummond D. Slow2020/11/18 07:48 AM
                                  SPEC is NOT a representation of average workloadsAdrian2020/11/18 08:15 AM
                                    SPEC is NOT a representation of average workloadsDummond D. Slow2020/11/18 08:41 AM
                                      SPEC is NOT a representation of average workloadsAdrian2020/11/18 09:04 AM
                                        SPEC is NOT a representation of average workloadsDummond D. Slow2020/11/18 09:32 AM
                                          SPEC is NOT a representation of average workloadsAdrian2020/11/18 10:26 AM
                                    SPEC is NOT a representation of average workloadsMaynard Handley2020/11/18 09:22 AM
                                      SPEC is NOT a representation of average workloadsAdrian2020/11/18 10:28 AM
                                  SPEC is NOT a representation of average workloadsAndrei F2020/11/18 08:34 AM
                                    SPEC is NOT a representation of average workloadsDummond D. Slow2020/11/18 09:00 AM
                                    SPEC is NOT a representation of average workloadsChester2020/11/18 02:18 PM
                                    SPEC is NOT a representation of average workloadsJukka Larja2020/11/20 08:03 AM
                                SPEC is NOT a representation of average workloadsChester2020/11/18 02:13 PM
                              SPEC is NOT a representation of average workloadsnone2020/11/18 08:07 AM
                                SPEC is NOT a representation of average workloadsMichael S2020/11/18 01:33 PM
                                  Interesting, thanks! (NT)none2020/11/19 07:03 AM
                            Cinebench is NOT a representation of average workloadsrwessel2020/11/18 07:03 AM
                              Cinebench is NOT a representation of average workloadsDoug S2020/11/18 07:44 AM
                                Cinebench is NOT a representation of average workloadsDummond D. Slow2020/11/18 07:52 AM
                                  Cinebench is NOT a representation of average workloadsDoug S2020/11/18 02:59 PM
                                    Cinebench is NOT a representation of average workloadsDummond D. Slow2020/11/18 03:12 PM
                                      Cinebench is NOT a representation of average workloadsDoug S2020/11/19 09:19 AM
                                        Cinebench is NOT a representation of average workloadsDummond D. Slow2020/11/19 03:03 PM
                                          Cinebench is NOT a representation of average workloadsUngo2020/11/19 08:12 PM
                                            Cinebench is NOT a representation of average workloadsDummond D. Slow2020/11/20 08:45 AM
                                It's not really SMT or adding small coresDummond D. Slow2020/11/18 07:58 AM
                                  It's not really SMT or adding small coresDoug S2020/11/18 03:02 PM
                                    It's not really SMT or adding small coresDummond D. Slow2020/11/18 03:27 PM
                                Cinebench is NOT a representation of average workloadsxyz2020/11/18 12:14 PM
                                  Cinebench is NOT a representation of average workloadsMaynard Handley2020/11/18 12:54 PM
                                    Cinebench is NOT a representation of average workloadsGabriele Svelto2020/11/18 01:41 PM
                                      Cinebench is NOT a representation of average workloadsMaynard Handley2020/11/18 01:52 PM
                                        Cinebench is NOT a representation of average workloadsGabriele Svelto2020/11/18 02:05 PM
                            Cinebench is NOT a representation of average workloadsTJ2020/11/18 11:46 AM
                            SMT shines in IO heavy & commercial DB workloadsxyz2020/11/18 12:05 PM
                            "Average workloads" don't exist (NT)Foo_2020/11/19 02:55 AM
                          Apple loses a lot by not having turbo and SMTDummond D. Slow2020/11/18 07:02 AM
                            Apple loses a lot by not having turbo and SMTMaynard Handley2020/11/18 08:37 AM
                              Apple loses a lot by not having turbo and SMTDummond D. Slow2020/11/18 08:55 AM
                              Apple loses a lot by not having turbo and SMTDavid Hess2020/11/18 12:12 PM
                                Apple loses a lot by not having turbo and SMTMaynard Handley2020/11/18 01:12 PM
                                  Apple loses a lot by not having turbo and SMTJörn Engel2020/11/18 04:04 PM
                                    Apple loses a lot by not having turbo and SMTanonymou52020/11/18 04:37 PM
                                      Apple loses a lot by not having turbo and SMTJörn Engel2020/11/19 03:28 AM
                                  Apple loses a lot by not having turbo and SMTDavid Hess'2020/11/19 06:25 PM
                          Apple loses a lot by not having turbo and SMTAdrian2020/11/18 07:23 AM
                            Apple loses a lot by not having turbo and SMTgallier22020/11/18 11:21 PM
                              Apple loses a lot by not having turbo and SMTJames2020/11/19 01:22 AM
                                Apple loses a lot by not having turbo and SMTWilco2020/11/19 04:06 AM
                              Apple loses a lot by not having turbo and SMTanonymou52020/11/19 01:34 AM
                                Apple loses a lot by not having turbo and SMTgallier22020/11/19 08:04 AM
                                  big.LITTLE with different ISAsJames2020/11/19 08:41 AM
                                    big.LITTLE with different ISAsgallier22020/11/20 02:36 AM
                                    big.LITTLE with different ISAsanon2020/11/20 12:31 PM
                              Apple loses a lot by not having turbo and SMTAdrian2020/11/19 01:56 AM
                        Apple loses a lot by not having turbo and SMTJon Masters2020/11/18 11:46 AM
                          Apple loses a lot by not having turbo and SMTanonymou52020/11/18 02:41 PM
                          Apple loses a lot by not having turbo and SMTDummond D. Slow2020/11/18 03:17 PM
                            Apple loses a lot by not having turbo and SMTMaynard Handley2020/11/18 04:46 PM
                              Apple loses a lot by not having turbo and SMTJon Masters2020/11/18 11:31 PM
                                Apple loses a lot by not having turbo and SMTDummond D. Slow2020/11/19 06:01 AM
                              Apple loses a lot by not having turbo and SMTAdrian2020/11/19 01:50 AM
                                Apple loses a lot by not having turbo and SMTAdrian2020/11/19 02:10 AM
                                Apple loses a lot by not having turbo and SMTMaynard Handley2020/11/19 09:13 AM
                                  Apple loses a lot by not having turbo and SMTDummond D. Slow2020/11/19 03:10 PM
                        Apple loses a lot by not having turbo and SMTjuanrga2020/11/19 01:49 AM
                    re: "scaling"sr2020/11/17 11:39 AM
                      re: "scaling"Adrian2020/11/17 12:41 PM
                        re: "scaling"Adrian2020/11/17 12:52 PM
                          re: "scaling"Chester2020/11/17 05:29 PM
                  re: "scaling"anonymou52020/11/16 07:18 PM
                    re: "scaling"Maynard Handley2020/11/16 07:44 PM
        And the NZ'ers are first to deliver cinebench scoresDummond D. Slow2020/11/16 04:12 PM
          And the NZ'ers are first to deliver cinebench scoresMaynard Handley2020/11/16 04:31 PM
            And the NZ'ers are first to deliver cinebench scoresDummond D. Slow2020/11/16 04:46 PM
        And the NZ'ers are first to deliver cinebench scoresMaynard Handley2020/11/16 06:04 PM
          And the NZ'ers are first to deliver cinebench scoresDummond D. Slow2020/11/16 06:28 PM
  1st round of M1 GPU benchmarksRayla2020/11/16 03:16 PM
    1st round of M1 GPU benchmarksChester2020/11/16 08:17 PM
  Phoronix Mac mini M1 benchanon52020/11/20 10:51 AM
    Phoronix Mac mini M1 benchPer Hesselgren2020/11/24 09:04 AM
      Phoronix Mac mini M1 benchPaul2020/11/25 02:08 AM
        Phoronix Mac mini M1 benchPaul2020/11/25 02:12 AM
Reply to this Topic
Name:
Email:
Topic:
Body: No Text
How do you spell avocado?