12:30 "[ISA] do not matter very much"

By: anon2 (anon.delete@this.anon.com), February 23, 2021 5:30 pm
Room: Moderated Discussions
rwessel (rwessel.delete@this.yahoo.com) on February 23, 2021 9:44 am wrote:
> none (none.delete@this.none.com) on February 23, 2021 7:37 am wrote:
> > Anon (no.delete@this.spam.com) on February 23, 2021 6:21 am wrote:
> > > anon2 (anon.delete@this.anon.com) on February 23, 2021 4:20 am wrote:
> > > > Apparently not easy for Intel though because they've been at it for years, every generation
> > > > telling us that finally rep mov doesn't suck, and every generation we find rep mov sucks.
> > >
> > > Which only proves Intel don't put much effort in it, and memcpy isn't the
> > > only case, gather sucked for generations until Skylake, Intel really loves
> > > having a lot of poorly implemented instructions, which proves nothing.
> > >
> > > > Which terrible ISAs / implementation are you talking about here?
> > >
> > > About any implementation that have several ifs to choose the
> > > most apropriate case and takes up to a few kB of the I$.
> > >
> > > > If they suck so bad at memcpy
> > > > then they must be even more inefficient to implement all other kinds of data movement that an
> > > > application will do, which (being ~everything except memcpy) is even more common than memcpy.
> > >
> > > No, memcpy is the most common memory operation, the other kind of data movement
> > > is more complex, a situation where there is advantages in doing by software.
> >
> > So Intel doesn't care about the most common memory operation? Are they that incompetent? Or
> > is it just that it is quite difficult to make it fast?
>
>
> Given that they're willing to spend a bazillion transistors on vector extensions that
> matter to hardly anyone*, how hard or costly could a fast memcpy() be? And if there's
> some huge issue with the interface provided by rep/movsb, define a new one.

The hard, sad fact you can't escape is that microcode is not magic. It can not solve any of the hard problems (i.e., unpredictability of control and data use) that normal instructions face.

If you had some amazing magical feature that Linus seems to believe exists in microcode that could instruct the load and store queues and caches "be ready for a transfer of this length" and have them magically do the right thing, then you would just make that available to software. Everything wants the caches and queues to magically do the right thing. The idea that memcpy is the only thing that might care is stupid.

If you had some additional unit or facility in the load/store units that was dedicated to data movement and could do these variable lengths or copies or things faster than the regular LSU instructions, then... you would just make this usable to to the ISA. Rocket science, I know.

Intel does seem to require massive vector registers to get the best LSU performance in some cases, but that seems more like they're being lazy and using rep ; mov as a crutch to try avoid putting proper intelligence into the LSU for larger memory operations. Faced with the likes of AMD and particularly Apple who are really pushing this kind of intelligence into the cores, I don't know how much longer they'll be able to coast on that strategy.

"Oh but rep ; mov is a tiny instruction that helps code size"

Wrong. That microcode has to be stored somewhere. Repeat after me, microcode is not magical. If you want complex instructions to be served very fast from microcode, then you have to store and wire those bits somewhere that could be used by general purpose i-cache. And special purpose caches are rarely superior to general ones, except where implementation constraints make that infeasible (e.g., L1 caches split to be close to their units).

Any time you think microcode can do something magical that a sane ISA can not, pinch yourself and have another think about it.

Yes it is upgraded with your processor. No that's not *such* a vast benefit that it makes the instruction indispensable, or even very interesting at all. A few % improvement on a few % portion of your workload, but you already had to upgrade your libraries and software anyway to get the overall 1,5,10,20% performance improvement that came from new instructions and instruction cost changes anyway.
< Previous Post in ThreadNext Post in Thread >
TopicPosted ByDate
New Lex Fridman interview with Jim KellerJohnG2021/02/20 12:25 AM
  12:30 "[ISA] do not matter very much" (NT)Moritz2021/02/20 10:45 AM
    AAARGH, what are we going to argue about then? (NT)j2021/02/20 03:43 PM
    Blasphemy! (NT):]2021/02/21 05:49 AM
    12:30 "[ISA] do not matter very much"anon22021/02/21 11:25 PM
      12:30 "[ISA] do not matter very much"Brett2021/02/22 12:59 AM
        12:30 "[ISA] do not matter very much"Etienne Lorrain2021/02/22 02:17 AM
      12:30 "[ISA] do not matter very much"Dummond D. Slow2021/02/22 09:57 AM
        12:30 "[ISA] do not matter very much"Anon2021/02/22 11:52 AM
          12:30 "[ISA] do not matter very much"juanrga2021/02/22 12:01 PM
          12:30 "[ISA] do not matter very much"Mark Roulo2021/02/22 12:54 PM
          ARM being a good idea doesn't mean it would have worked for AMDDummond D. Slow2021/02/22 02:34 PM
            ARM being a good idea doesn't mean it would have worked for AMDAnon2021/02/22 04:25 PM
              ARM being a good idea doesn't mean it would have worked for AMDDummond D. Slow2021/02/22 05:55 PM
                ARM being a good idea doesn't mean it would have worked for AMDDoug S2021/02/23 01:03 PM
                  ARM being a good idea doesn't mean it would have worked for AMDDummond D. Slow2021/02/23 01:27 PM
                    ARM being a good idea doesn't mean it would have worked for AMDBrett2021/02/23 04:57 PM
                      3rd parties licensing ARM coresAnon2021/02/25 05:01 AM
                        3rd parties licensing ARM coresAnon2021/02/25 05:48 AM
                        3rd parties licensing ARM coresdmcq2021/02/25 07:01 AM
                          3rd parties licensing ARM coresDummond D. Slow2021/02/25 10:17 AM
                            3rd parties licensing ARM coresAnon2021/02/25 11:11 AM
                              3rd parties licensing ARM coresAnon2021/02/26 03:54 AM
                              3rd parties licensing ARM coresDummond D. Slow2021/02/26 11:01 AM
            ARM being a good idea doesn't mean it would have worked for AMDLinus Torvalds2021/02/22 06:06 PM
              ARM being a good idea doesn't mean it would have worked for AMDDummond D. Slow2021/02/22 08:19 PM
              ARM being a good idea doesn't mean it would have worked for AMDanon22021/02/22 08:28 PM
              ARM being a good idea doesn't mean it would have worked for AMDdmcq2021/02/23 06:35 AM
                ARM being a good idea doesn't mean it would have worked for AMDJukka Larja2021/02/23 08:12 AM
                  ARM being a good idea doesn't mean it would have worked for AMDSimon Farnsworth2021/02/23 09:42 AM
                    ARM being a good idea doesn't mean it would have worked for AMDJukka Larja2021/02/24 07:03 AM
                ARM may have been a threat to Intelwumpus2021/02/23 09:30 AM
      12:30 "[ISA] do not matter very much"blaine2021/02/22 10:37 AM
        12:30 "[ISA] do not matter very much"anon22021/02/22 08:17 PM
          12:30 "[ISA] do not matter very much"Anon2021/02/23 04:05 AM
            12:30 "[ISA] do not matter very much"Wilco2021/02/23 04:48 AM
              12:30 "[ISA] do not matter very much"Bigos2021/02/23 04:55 AM
                12:30 "[ISA] do not matter very much"Wilco2021/02/23 05:15 AM
                  12:30 "[ISA] do not matter very much"Bigos2021/02/23 06:16 AM
                12:30 "[ISA] do not matter very much"Travis Downs2021/02/27 12:46 AM
              12:30 "[ISA] do not matter very much"Anon2021/02/23 07:26 AM
                12:30 "[ISA] do not matter very much"anon22021/02/23 05:35 PM
                  12:30 "[ISA] do not matter very much"Anon2021/02/24 08:57 AM
                12:30 "[ISA] do not matter very much"Wilco2021/02/24 05:37 AM
                  12:30 "[ISA] do not matter very much"Etienne Lorrain2021/02/24 07:24 AM
                    12:30 "[ISA] do not matter very much"Anon2021/02/24 09:11 AM
                    12:30 "[ISA] do not matter very much"rwessel2021/02/24 09:45 AM
                      12:30 "[ISA] do not matter very much"Etienne Lorrain2021/02/25 02:02 AM
                        12:30 "[ISA] do not matter very much"rwessel2021/02/25 05:51 AM
                        12:30 "[ISA] do not matter very much"Anon2021/02/25 05:53 AM
                  12:30 "[ISA] do not matter very much"Anon2021/02/24 09:07 AM
                    12:30 "[ISA] do not matter very much"Wilco2021/02/24 12:37 PM
                      runtime selection vs. heterogenous cores?Matt Sayler2021/02/24 07:10 PM
                        runtime selection vs. heterogenous cores?Wilco2021/02/26 06:22 AM
            12:30 "[ISA] do not matter very much"anon22021/02/23 05:20 AM
              12:30 "[ISA] do not matter very much"Anon2021/02/23 07:21 AM
                12:30 "[ISA] do not matter very much"none2021/02/23 08:37 AM
                  12:30 "[ISA] do not matter very much"rwessel2021/02/23 10:44 AM
                    12:30 "[ISA] do not matter very much"anon22021/02/23 05:30 PM
                      12:30 "[ISA] do not matter very much"Anon2021/02/24 09:25 AM
                        12:30 "[ISA] do not matter very much"anon.12021/02/25 07:13 AM
                  12:30 "[ISA] do not matter very much"Anon2021/02/24 09:44 AM
                12:30 "[ISA] do not matter very much"anon22021/02/23 04:51 PM
                  12:30 "[ISA] do not matter very much"Anon2021/02/24 09:31 AM
            12:30 "[ISA] do not matter very much"vvid2021/02/23 07:41 AM
              12:30 "[ISA] do not matter very much"Michael S2021/02/23 09:52 AM
                12:30 "[ISA] do not matter very much"rwessel2021/02/23 10:33 AM
                  12:30 "[ISA] do not matter very much"Linus Torvalds2021/02/23 12:44 PM
                    12:30 "[ISA] do not matter very much"rwessel2021/02/23 01:21 PM
                      12:30 "[ISA] do not matter very much"Linus Torvalds2021/02/23 01:30 PM
                        12:30 "[ISA] do not matter very much"Andrey2021/02/25 04:06 AM
                          12:30 "[ISA] do not matter very much"Anon2021/02/25 06:04 AM
                            12:30 "[ISA] do not matter very much"Andrey2021/02/25 06:54 AM
                              12:30 "[ISA] do not matter very much"Anon2021/02/25 07:33 AM
                          12:30 "[ISA] do not matter very much"Linus Torvalds2021/02/25 11:35 AM
                            12:30 "[ISA] do not matter very much"Andrey2021/02/25 02:34 PM
                              12:30 "[ISA] do not matter very much"Etienne Lorrain2021/02/26 02:18 AM
                              12:30 "[ISA] do not matter very much"dmcq2021/02/26 04:23 PM
                12:30 "[ISA] do not matter very much"Anon2021/02/24 09:45 AM
              12:30 "[ISA] do not matter very much"Gabriele Svelto2021/02/23 10:15 AM
          Context of ISA doesn't matterPaul A. Clayton2021/02/26 01:03 PM
  Is there a text version? (NT)Foo_2021/02/20 05:33 PM
    good question (NT)Michael S2021/02/21 05:31 AM
    Is there a text version?:]2021/02/21 11:34 AM
Reply to this Topic
Name:
Email:
Topic:
Body: No Text
How do you spell tangerine? 🍊