Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Queen6

macrumors G4
Bottom line is in the real world the Intel i9 rapidly overheats and throttles. M1 very different beast with vastly less power draw. So, take your pick especially on a potable system.

All these numbers add up to nothing if the battery is depleted and that's a prevailing factor for many. Being "King of the day" for a few seconds is pointless versus sustained performance for the full day...

Q-6
 

mi7chy

macrumors G4
Oct 24, 2014
10,622
11,294
Because everyone has a Perl interpreter on their Unix machine and the language has been traditionally used for text processing. It’s also a small program with minimal C implementation and not much complexity, which makes it an interesting benchmarking case. I still wouldn’t recommend anyone to work with Perl. It’s unreadable and awkward.

When regex performance is a concern where you start benchmarking then perhaps explore high performance regex libraries such as hyperscan, re2 or rust regex.

https://github.com/rust-leipzig/regex-performance
results_20221012.png
 

throAU

macrumors G3
Feb 13, 2012
9,198
7,350
Perth, Western Australia
Perl regex is one performance measure but I’d argue that it’s not really something the m1X was designed to excel at. As demonstrated above it is fast at it, but it’s not what it is designed for really.

If that’s what you care about running fast you’re probably better off with a cheaper ryzen based laptop in terms of bang for buck.

Where the m1 line truly excels is when running applications that can make use of its built in accelerators for various applications under macOS where the low level frameworks for these features can be utilised.
 

leman

macrumors Core
Oct 14, 2008
19,521
19,674
Perl regex is one performance measure but I’d argue that it’s not really something the m1X was designed to excel at. As demonstrated above it is fast at it, but it’s not what it is designed for really.

I am really not sure what you mean by that. It’s a CPU. It runs CPU stuff. It’s not like Apple engineers sat down and were like “ok guys, let’s build a versatile power efficient CPU, but keep in mind that we aren’t really designing it to run CPU stuff”.

Apple computers were always about versatility. They are jacks if all trades. Sure, Apple Silicon has added a few tricks that makes it excel at some particular workloads (like video editing), but it’s still a very capable general purpose machine.

Regarding your comment “you could get a Ryzen”, no, one couldn’t really. The Ryzen mobile has neither Apples versatile CPU performance not their energy efficiency. Take my particular case. My workloads are mostly CPU based (data wrangling, building code, simulations etc) - but because M1 is such a capable CPU it performs much better on what I need than other laptop CPUs, while also giving me unmatched battery life. The beauty of M1 is that it’s excellent at running suboptimal code - that’s where it caches and execution units really come into their own. And when you need flexibility, well, most if the code you will run is suboptimal.
 

throAU

macrumors G3
Feb 13, 2012
9,198
7,350
Perth, Western Australia
I am really not sure what you mean by that. It’s a CPU. It runs CPU stuff

What I mean is that it is not just a CPU, it is a custom SOC with various media and ML engines attached, designed to run macOS and associated applications as fast as possible via native code using the Apple frameworks.

yes, it has a CPU and runs CPU things, but using an M1 to do regex is like using a sledgehammer to drive nails. Or the blunt end of a screwdriver to drive nails, depending on your perspective. I'm not saying they designed it to NOT run general CPU stuff well.

I'm not saying Ryzen is necessarily faster for regex, what I am saying is that if regex is your primary workload, you'll probably get better bang for buck elsewhere. Especially an M1 Max (per the OP) as its just an M1-Pro with a bigger GPU that regex will totally not use.

I'm not saying it isn't an extremely capable CPU. I'm saying that someone basing their evaluation of it on regex performance is largely missing the point. Unless that's your primary workload.

It's like benchmarking an i7 with x87 FPU code from the 1990s. Sure, it can do it, and sure it will be faster than a 486 at it. But an i7 is so much more capable than that - it can do other tasks (including math related things, via newer instruction set) so much faster if the appropriate libraries/instructions are used. e.g., AES in hardware, vector manipulation instructions, etc.

Same with the M1, except it has a bunch of hardware for high speed media/AI processing.


What I'm getting at (since my first post, which appears to have been misinterpreted) is that unless your primary workload for your shiny new Mac is regular expressions, the benchmark, irrespective of how fast or slowly the M1 runs it is largely irrelevant. And that will be the case for 99% plus of Mac users.

It doesn't surprise me that the M1 is good at it though as it has good memory bandwidth, large caches, etc. Its just a super bad way of comparing performance between the two systems for almost the entire user base of either CPU, in 2022.
 
Last edited:

leman

macrumors Core
Oct 14, 2008
19,521
19,674
What I mean is that it is not just a CPU, it is a custom SOC with various media and ML engines attached, designed to run macOS and associated applications as fast as possible via native code using the Apple frameworks.

yes, it has a CPU and runs CPU things, but using an M1 to do regex is like using a sledgehammer to drive nails. Or the blunt end of a screwdriver to drive nails, depending on your perspective. I'm not saying they designed it to NOT run general CPU stuff well.

I'm not saying Ryzen is necessarily faster for regex, what I am saying is that if regex is your primary workload, you'll probably get better bang for buck elsewhere. Especially an M1 Max (per the OP) as its just an M1-Pro with a bigger GPU that regex will totally not use.

I'm not saying it isn't an extremely capable CPU. I'm saying that someone basing their evaluation of it on regex performance is largely missing the point. Unless that's your primary workload.

It's like benchmarking an i7 with x87 FPU code from the 1990s. Sure, it can do it, and sure it will be faster than a 486 at it. But an i7 is so much more capable than that - it can do other tasks (including math related things, via newer instruction set) so much faster if the appropriate libraries/instructions are used. e.g., AES in hardware, vector manipulation instructions, etc.

Same with the M1, except it has a bunch of hardware for high speed media/AI processing.


What I'm getting at (since my first post, which appears to have been misinterpreted) is that unless your primary workload for your shiny new Mac is regular expressions, the benchmark, irrespective of how fast or slowly the M1 runs it is largely irrelevant. And that will be the case for 99% plus of Mac users.

It doesn't surprise me that the M1 is good at it though as it has good memory bandwidth, large caches, etc. Its just a super bad way of comparing performance between the two systems for almost the entire user base of either CPU, in 2022.

A computer is a tool. I firmly believe that a tool that excels at particular work is a good tool for that work. Of course I can use an inferior tool to do the same work. But it will only be a “better bang for buck” by a very naive metric that ignores almost all the relevant factors. My time and mental state as a professional is much more costly than a price of a computer. So the best bang for buck is a computer that reduces my downtime while being a joy to work with.

I also believe it’s overly restrictive to only look at Apple Silicon as a collection of accelerators that must be used together. As I said, it’s a versatile tool which works well for many different domains. Why is it a waste to ignore the existence of media engine or ML accelerators if the rest of the system excels at what you need it for? Apple gives you a bunch of things, you are free to use only what you need. You are not losing anything because it’s not like there is an alternative, and you are not wasting anything because, well, it’s not like there is an alternative.

And finally, on the matter of regex benchmarking itself… I fully agree that it’s a dumb test. Mostly because the tests OP do are very far from reality. They are testing patterns that have relevance in the automata theory but nobody uses that particular stuff in real world. That said, benchmarking general purpose regex engines does have some relevance. Regex engines are characterized by branchy control flow and a lot of control decisions, they put pressure on the CPUs integer backend as well as it’s ability to execute code speculatively and predict execution paths. They are similar in nature to code patterns found in interpreters, compilers and other processors of symbolic information. Perl is also an interesting case because it’s general-prose C code, without meticulous micro-optimization for specific CPU architectures. In short, I’d expect these kind of tests to be a reasonable predictor of performance for an entire class of tools (compilers, symbolic calculators etc.). And that’s also what we tend to find elsewhere, with M1 machines punching way above their weight for many developer workloads.

But it’s definitely a terrible test for general performance, that’s for sure. Not that “general performance” can be reduced to a single metric.
 
  • Like
Reactions: dgdosen

theorist9

macrumors 68040
May 28, 2015
3,880
3,060
Third, I am a trained computer scientist. The log graph is commonly used when things get exponential so we can see differences at different levels.
Yes, when you're plotting data that varies over several orders of magnitude, a log graph is generally your only choice (unless you want to use a broken axis, but that's a PITA to graph). But your response seems to miss @leman's point, which is that the problem isn't that you used a log graph (which is unavoidable), but that you used it in an inappropriate way.

I.e., if your purpose was to show that the run times for the i9 and M1 scaled in the same way, your graph would be fine. But that's not why you presented it. Instead, your purpose was to show "Sometimes [the M1]...seems barely faster than the Core i9". The problem with your graph is it obscures the very information you claim to be presenting! Your graph, by construction, makes the i9 and M1 look as if they are close in performance even if they not—for instance , even if the two had a 50% difference in performance (which is substantial), they would stil be nearly on top of each other in your graph.

Hence you really should re-do those graphs by plotting, as leman suggested, the ratios of the run times.
 
Last edited:

maflynn

macrumors Haswell
May 3, 2009
73,682
43,740
Especially one in a similar to MacBook Pro form factor.
Correct, my 15" Razer has decent cooling but the fans are quite noticeable, especially the harder I push it. I tried a 14" Razer and the fan noise was even worse, but then that makes sense. Smaller form factor but still using a RTX GPU
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.