Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Perl regex speed

by dave_the_m (Monsignor)
on Oct 26, 2022 at 08:29 UTC ( [id://11147709] : note . print w/replies, xml ) Need Help??


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

Why would you expect arm64 to be noticeably faster? Have ARM patented some amazing new technology that Intel can't use?

Dave.

Replies are listed 'Best First'.
Re^4: Perl regex speed
by malaigo (Novice) on Oct 27, 2022 at 03:07 UTC
    In particular, the proprietary Apple Silicon arm64 implementation is supposed to be much better. See here.

      While the M1 is a very nice chip and surprisingly competitive for anything that's not x86_64, it's very far from destroying the competition in anything except performance per watt... which is all that picture shows.

      In other words, you paid less for the electricity to run the test on the M1 than you paid to run it on the Intel chip.

        No, that's the vertical line, e.g. at 10W or whatever. Bu you can also draw a horizontal line and the M1 is above peak x86.
Re^4: Perl regex speed
by malaigo (Novice) on Oct 27, 2022 at 03:05 UTC
    Well, Apple's arm64 implementation is considered to be head and shoulders above the competition. See for example Apple slide on Anantech
      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.
      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.

      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
        stop posting links to pretty pictures

        Would you prefer pictures that are not pretty???