in reply to Re^3: Perl regex speed
in thread Perl regex speed

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^5: Perl regex speed
by afoken (Chancellor) on Oct 27, 2022 at 11:00 UTC
    See for example Apple slide on Anantech

    Nicely drawn, but technically, the information content is close to zero. This is the kind of graphics you use to separate people with too much money and too little knowledge from their money.

    What information can we gain from the image?

    Quite obviously, the "Apple M1" is compared against the "latest PC laptop chip".

    According to the file name of the image, it is from November 2020, before the M1 Pro, M1 Max, and M1 Ultra were released. So this is old news, Apple, AMD and Intel have released new hardware with different power consumption and performance since then. If you want to test performance, you need to use hardware from November 2020, not from 2022.

    Comparing apples and oranges: The apple is clear, it's the original Apple M1. But what is the orange, the "latest PC laptop chip" in November 2020? Intel or AMD? Which model? There is simply no information in the image.

    Comparing apples and oranges, again: The Apple M1 is a System-on-a-chip, combining the CPU cores, lots of peripherals, and even the main RAM on the same chip. (Technically, the RAM is a sepearate chip on the same carrier.) This is more like a smartphone or tablet design and less like a PC/Laptop design. PCs, including laptops, keep the RAM separate, a lot of peripherals are in the south bridge of the chipset, older designs have CPU, memory and fast bus systems connected to the north bridge. Modern designs moved the memory controller from the north bridge to the CPU. Also, PCs still have lots of legacy hardware, including an LPC (low pin count) bus that looks and feels like a classic ISA bus to all software. Which parts are included in the power consumption, which are excluded?

    The X axis: We have exactly one X value, 10 W. Both the M1 and the "latest PC laptop chip" consume 10 W, or less, or more. How much less? How much more? We can't know, there is no second X value. We don't know if the X asis starts at 0 or some other value. Mathematically, it should start at 0, but in the real world, X and Y axes may have an offset. We can perhaps guess that the X asis starts at 0, because neither M1 nor the "latest PC laptop chip" have any performance at x=0. But we can't even guess where M1 or "latest PC laptop chip" power consumption start or end, because we don't now if the X asis is linear, logarithmic, exponential, or some other scaling. With some creative scaling, the top consumption of the two chips might differ only in a few Milliwatts, or by Kilowatts if scaled differently

    The Y asis: No Y values at all, not even a unit, like Floating point operations per second, Integer operations per second, benchmark points, whatever. This is even worse than the X axis. All problems of the X axis also apply. Unknown scaling, unknown origin. Again, with some creative scaling, the difference between the two chips might be down in the noise floor, or astronomic.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re^5: Perl regex speed
by soonix (Chancellor) on Oct 27, 2022 at 13:51 UTC
    That picture seems to come from page 5 of this Anandtech post, and the description says

    In this graphic, Apple showcases the new M1 chip featuring a CPU power consumption peak of around 18W. The competing PC laptop chip here is peaking at the 35-40W range so certainly these are not single-threaded performance figures, but rather whole-chip multi-threaded performance. We don’t know if this is comparing M1 to an AMD Renoir chip or an Intel ICL or TGL chip, but in both cases the same general verdict applies:

    Apple’s usage of a significantly more advanced microarchitecture that offers significant IPC, enabling high performance at low core clocks, allows for significant power efficiency gains versus the incumbent x86 players. The graphic shows that at peak-to-peak, M1 offers around a 40% performance uplift compared to the existing competitive offering, all whilst doing it at 40% of the power consumption.

    Apple’s comparison of random performance points is to be criticised, however the 10W measurement point where Apple claims 2.5x the performance does make some sense, as this is the nominal TDP of the chips used in the Intel-based MacBook Air.

    … which more or less overlaps with what Alexander said.
      Your comment about this graph being not about single threaded performance is a good one. M1 had 8 cores, 4 efficiency, 4 performance. The Intel laptop processors at that time have 6 cores, with hyper threading (bumping up real performance a bit, hyper threading generally adding some fractional core performance). But it's not like the M1 had a lot more cores.
Re^5: Perl regex speed
by eyepopslikeamosquito (Archbishop) on Oct 27, 2022 at 04:24 UTC

    Please do us all a favour and stop posting links to pretty pictures in .jpg files.

    I would much rather see links that describe in detail how the measurements were done, with full source code of the benchmark programs along with exactly how they were compiled and run, so that others can independently run the benchmarks for themselves.

      If a plot is required, one can be easily done in a way the text-based forum supports it (as long as the screen width is sufficient):

      Air pressure BME + 991.28 +--------------------------------------------------------- +--------------------------------------+ | + *** + + + + + + + + | 991.26 |-+ ******* + +-| | ***** ** ** **** + | 991.24 |** *** ***** *** **** + +-| |* * **** ** ** + | |* ****** ** **** ** * + | 991.22 |-+ ********** + +-| | * * **** +** | 991.2 |-+ ******* ** * +*** +-| | * ****** **** + ** | hPa 991.18 |-+ ** **** + * +-| | ** + *** *** | 991.16 |-+ + ******** +-| | + ** *** | 991.14 |-+ + *** +-| | + * | | + ***** | 991.12 |-+ + *** +-| | + ** * | 991.1 |-+ + ********* +-| | + + + + + + + + ****** | 991.08 +--------------------------------------------------------- +--------------------------------------+ 27.10 27.10 27.10 27.10 27.10 27.10 + 27.10 27.10 27.10 27.10 09:30 09:45 10:00 10:15 10:30 10:45 + 11:00 11:15 11:30 11:45

      I used Gnuplot to make this:

      set title "Air pressure BME" set datafile separator ";" set terminal dumb size 120,30 #set output "bme_pressure.png" set xlabel "Logtime UTC" set ylabel "hPa" set xdata time #set timefmt "%Y-%m-%d" #set xrange ["03/21/95":"03/22/95"] set format x "%d.%m\n%H:%M" set timefmt "%Y-%m-%d %H:%M:S" set key autotitle columnhead outside plot "bme_pressureonly.csv" using 1:2 title "" with lines

      The magic line here is:

      set terminal dumb size 120,30

      PerlMonks XP is useless? Not anymore: XPD - Do more with your PerlMonks XP
        Well, you can run my code. Exactly. Use something like termcap for terminal graphics. But frankly, pictures are easier to read. Apple's code, I don't have, so I can't make terminal graphics out of that.
      stop posting links to pretty pictures

      Would you prefer pictures that are not pretty???

        Would you prefer pictures that are not pretty???

        Sorry, I should have been clearer. I was not asking for pictures at all. I smelled an Apple Fanboy and the supporting pretty pictures looked more marketing than science to me.

        Given the OP claims to be a University professor, I was frankly astonished to see these pretty pictures being presented as evidence. I expected to see peer-reviewed academic papers, or at the very least, links than contain source code along with details of how the benchmarks were run, so they can be independently reviewed and verified by others.

        Update 28 Nov 2022: Noticed this Quora story in my inbox today asking: Why is the M1 chip in Mac far overrated over the core i9 11th generation?

        One random quote that caught my eye:

        There’s a war of words going on between Apple and Intel fanboys here. The raw performance of some Intel chips exceeds the performance of the M1 and M1 Pro. On performance per watt Apple wins hands down.

        "Pretty <xxx>" is an sarcastic term attacking the trend of "Form over Function" °

        This is one of the fundamental conflicts software designers have, if they are asked by amateurs (aka bosses) to dumb down carefully designed interfaces into something prettier (sic).

        In this case: Charts look better with less text and appealing colors, but loose crucial information.

        E.g: I'm afraid the new metacpan interface is an example for sacrificing function for form.

        Cheers Rolf
        (addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
        Wikisyntax for the Monastery

        °) Apparently this conflict is much older than IT and originates in architecture ... Makes sense :)

        see Form follows function