🤯 SURPRISING M3 MacBook Coding Performance
Вставка
- Опубліковано 26 лис 2023
- Discover which MacBook reigns supreme in our unexpected coding showdown between the M3, M3 Pro, and M3 Max.
Temperature/fan on your Mac: www.tunabellysoftware.com/tgp... (affiliate link)
Run Windows on a Mac: prf.hn/click/camref:1100libNI (affiliate)
Use COUPON: ZISKIND10
🛒 Gear Links 🛒
* 🍏💥 New MacBook Air M1 Deal: amzn.to/3S59ID8
* 💻🔄 Renewed MacBook Air M1 Deal: amzn.to/45K1Gmk
* 🎧⚡ Great 40Gbps T4 enclosure: amzn.to/3JNwBGW
* 🛠️🚀 My nvme ssd: amzn.to/3YLEySo
* 📦🎮 My gear: www.amazon.com/shop/alexziskind
🎥 Related Videos 🎥
* 🌗 RAM torture test on Mac - • TRUTH about RAM vs SSD...
* 🛠️ Set up Conda on Mac - • python environment set...
* 👨💻 15" MacBook Air | developer's dream - • 15" MacBook Air | deve...
* 🤖 INSANE Machine Learning on Neural Engine - • INSANE Machine Learnin...
* 💻 M2 MacBook Air and temps - • Why SILVER is FASTER
* 💰 This is what spending more on a MacBook Pro gets you - • Spend MORE on a MacBoo...
* 🛠️ Developer productivity Playlist - • Developer Productivity
👨💻 Primes - github.com/PlummersSoftwareLL...
💻 MacBooks in this video
M3 Max (16/40) 16" MacBook Pro 64GB/2TB
M3 Pro (11/14) 14" MacBook Pro 18GB/512GB
M3 (8/10) 14" MacBook Pro 8GB/512GB
- - - - - - - - -
❤️ SUBSCRIBE TO MY UA-cam CHANNEL 📺
Click here to subscribe: / @azisk
- - - - - - - - -
Join this channel to get access to perks:
/ @azisk
- - - - - - - - -
📱LET'S CONNECT ON SOCIAL MEDIA
ALEX ON TWITTER: / digitalix
- - - - - - - - -
#m3 #macbook #macbookpro - Наука та технологія
JOIN: youtube.com/@azisk/join
I love that you're like one of the ONLY creators who show PROGRAMMING performance.
Yes, the other creators show video rendering and editing etc which I could not care less about..
Exactly! 💯 That's why I subscribed.
The reason I've dismissed most of other reviews as well
Very true !
True
The difference in speed between M3 and the others with multithreaded test, is because the test are very slow in comparison with the coordination time required to synchronize more threads sending messages and waiting for all the threads to finish their jobs. I had this problem few years ago and I had to find the ideal number of threads to solve a problem, because not all problems scale well with more threads, in some cases i found that the single threaded solution was faster .
Can you make a video comparing the 18GB M3 Pro MacBook Pro to the 36GB M3 Pro MacBook Pro with regards to developers' needs, including VM?
Greetings,
These devices should perform similarly.
Best regards,
Johnny
I think the reason why the base M3 was consistently faster is because it has the tightest cluster of CPU cores, M3 Pro and M3 Max have more cores which are more spread out, so perhaps that added some latency whereas the tightness of M3's CPU made it significantly faster. I assume only super-fast tasks are the ones that would benefit from this, bigger and heavier tasks that would sit on the core longer would likely perform better.
Also less cores by design means smaller amount of cores signaling overhead, and I think some of the overhead is constant extra even on binned m3 pro.
never thought of it like that but it makes sense, good point
As long as the program doesn't require a lot of memory because if it does, it will be very bad.
@@antdx316 How's that relevant? That's true for any computer, less RAM than what the task require will result in memory swap and slow downs, that wasn't the case here.
All M3s have 16mb L2 per P-core cluster so the standard M3 has more L2 per core than the pro/max.
I think your theory is correct. Thread creation may incur system calls, which create overhead by context switching in the operating system. Also, for shorter runs, larger vents don't make much of a difference.
Thank you for adding charts to the videos!
Love the setup and excitement and audio, video quality. Want to see more such amazing content!
Maybe next time you could use Activity Monitor’s CPU History graphs (or something similar) to see how many and what type of cores are being used?
Yep, it comes with the OS :)
The video I needed thanks!
You bet!
interesting results. I just recently got an M1 MacBook Pro and am loving it so far, I wonder how it compares against the latest?
I still believe that the compilers (and others) are not ready for this new set of chips. BTW Alex, as always, NICE VIDEO!!!!!!!
Thanks!
We can see that rerunning the benchmarks per update and look for changes.
Exactly, not ready for this chip a.k.a "not optimized". The problem is that 95% of sofware is opmized not even to this specific chip, but even for m2 etc.. so thats why no one sees difference in real life scenarios.
@@AZisk I remember you did some benchmark videos where we you used followers benchmark code in the video. Are you still open to including followers benchmarks into some upcoming tests? If yes, where can i/we send it to?
Thinking of which one to get for my machine learning courses and projects. Would be nice a video with LLAs and stuff like that. Great videos ✌️
Wait, are you taking an AI course?
Which will be better m2 16gb varaient or m3 base varaient? I wanna code and I need it for future maybe 5 or 6 years which is best
Great video! I'm getting ready to upgrade my intel mac and this video helps in the decsion making process.
Great to hear!
This needs to be amplified
Most tech influencers are video editors and they always evaluate the encoding(insert final cut pro ) side of the machine performance
and very few actually speaks for ur poor programmers
Thanku for doing the lord's work 😊😊
Out of curiosity, I ran this test (PrimeRust/Solution1) on my M1Max. Slightly different algorithms are implemented there, and you can observe a whole order of magnitude difference in the results:
1 thread, bit-rotate: 4639
1 thread, bit-unrolled-hybrid: 4320
1 thread, bit-extreme-hybrid: 87003
4 threads, bit-rotate: 17586
4 threads, bit-unrolled-hybrid: 16440
4 threads, bit-extreme-hybrid: 331302
10 threads, bit-rotate: 39317
10 threads, bit-unrolled-hybrid: 36913
10 threads, bit-extreme-hybrid: 707455
From this, we can conclude that the issue definitely doesn't lie with the threads, compilers, the system, or the processor itself.
I ran the same langs and solutions in the bar graphs. Unless we can see which specific metric he’s calling out in the bar graph I’m going to consider this upload infotainment and not something a person should base buying decisions on.
Hi Alex, I can not find any test regarding the M2 ultra VS RTX 4090. Could you please make a comparison between M2 ultra 76 cores GPU VS RTX 4090 in terms of machine learning and specifically in training object detection YOLOv8 models? We just hearing about the number of CUDA cores in Nvidia, but how we can compare that with M2 ultra performance?
I would like to add my perspective/opinion. Maybe it has to do with the core allocation for the tasks. Not sure how macos distributes tasks to cores, but maybe some tasks are executed on the E-cores and seem to stay there during their execution.
Hypothesis for the “M3 is faster”
Compiling code in parallel ofcourse comes with overhead. Probably there are diminishing returns when using more cores than the M3. If there is an option for it then try to limit the number of threads
Especially with small unit tests.
This video is perfect!
should be interesting to see the compilation comparisons under virtualization with Docker. maybe do a separate run with arm64 plaftform and another using x86/amd64 platform with Rosetta . can you do that as well?
This!!
It’s not the spinning up or threads that’s causing this. Switching threads takes extra cpu cycles, so the more threads you have the more switching will happen yielding a long response on multi threaded work loads that are short lived, for longer running tasks this will reduce time because there will be less handshaking between threads in the long run…
On a side discussion, I thought in this Black Friday/Cyber Monday the prices of the the M2 Machines would be more aggressively discounted. I looked intensively for nice deals, but to no avail. I bought the base model 14 M3 Max as replacement for my base model 14 M1 Pro. I thought I would get a M2 Max with a very nice discount USD 500+, but no, I got the USD 250 discount on the base model with a 1 TB disk at Adorama.
Can you compare M1 Max vs M2 Max and M3 Max if it is worth upgrading for higher end workloads like ML training etc.
Please do a real world comparison with lot of programs running in parallel - 2-3 vs code windows with active programs in their terminals, 2-3 docker instances, two browsers with minimum 15 tabs each, ms teams with lot of chats, postman, Outlook.
We could just do it ourselves. I'm searching thru this vid to find what 10 tests he fired off so I can do a run on my machine. This upload is reading more like infotainment than info.
The performance of an application is not solely determined by the number of threads it uses. Instead, it significantly depends on how the code utilizes resources and what tasks it is designed to perform.
As a junior pentester i find these vidoes very informative. As im looking for next laptop. My current one is 10+ years old
Could the be any thermal throttling due to be working on battery? When editing videos there is a huge difference if your are working with AC or battery, so if you have a higher amount of cores the heat could be higher causing a slow down for the performance.
It seems like the M3 Max turns off half of its P-cores when it determines they're not needed. This kind of thing might be hampering the M3 Max performance to keep a lower power budget. Especially on battery. TG Pro has a blog post about this, which I tried to link to but discovered UA-cam deletes those comments.
Alex, did you set Energy Mode to High Power (in System Settings > Battery)?
(Sorry if this ends up showing up a lot!)
woah. thanks. I need to look it up. I never expected max to do this to save battery although I doubt people would notice this unless it doesnt ramp up when it needed
Hey Alex
Thanks for the video, very informative
What do you think about the space black after 2 week use, the fingerprints, scratches, weariness?
Thank you in advance!
Hello, I got the space black and returned for the silver one, it doesn’t look bad or anything, but the regular white dust of the rooms or environments it’s very noticeable. But I believe is more a personal preference. Happy holidays. And Alex, thank you so much for this video, I’m kinda shock about the results. Looking forward for some explanations. Happy holidays.
I’d run the test with the same number of threads to see if the cores are significantly different. Not sure how you can schedule them on the P vs E cores though
`taskpolicy -c background ./some_program` will run it on E-cores. `man taskpolicy` to see the other modes besides "background".
1) The M3 Max machine has a larger screen, which means it has to push more pixels, which runs the GPU and display controller, which makes the chip use more energy which means it will be hotter. So I wonder if the M3 Max is being throttled just a bit compared to the M3?
2) Finding primes from 2 to 1,000,000 is not very difficult, with well known, efficient algorithms. Surprisingly few bits have to be flipped in the actual array(s) of integers. Which means the program overhead is important for such a short run, and as you conjectured the overhead with managing multiple threads eats up any advantage from having more cores.
1. Nah, there’s no way the M3 Max is throttling because of the screen. Display controller is not an intensive task at all.
I have some MC polymer simulations for a university project that run for over 8 hours on my M1 MBP 8GB RAM… I can send you those and you can test these on the M3 family. Would be interesting, for me at least 😂
Ill admit ive not looked at the builds, but having looked at the performance of apple silicon in a CI setting this checks out. Fewer cores (even with parallelism count at a fixed number) equals faster performance per core.
Also they are horrible at handling more than one build job at a time.
for repetitive small tasks like the one you ran the more cores is actually detrimental that's why the base won
Hello Alex,
With your assumption that the performance differences can be due to more threads, for example, you are somehow eight, but this is not the only effect in this scenario.
In general, more cores also mean more work for the OS scheduler and in theory an increasing overhead in their administration and the distribution of tasks.
AS uses to mitigate this effect or to keep the working speed predictable in scenarios with a low thread number core blocks that are activated depending on the thread number. These blocks speak as directly as possible to the associated memory (memory channels), if the system utilization allows it.
This is very good for developers, as the performance characteristics of AS are very predictable, which enables some optimization techniques.
The second effect that probably shows here is the way MacOS deals with memory (virtual memory). The more RAM a system has, the more generously the system/scheduler allocates memory to programs.
With Mac OS, the RAM used is not necessarily what you see in the Activity Monitor. Often more RAM in the system is better, but in this case of tons of short calculations, a certain overhead is also in place by the allocating and later the releasing Ram. So the management of memory is also associated with a certain overhead. In this case, milliseconds then add up to seconds when we speak of tons of bursts.
All in all, the differences are relatively negligible and as a programmer you get roughly the same processing speed for your apps despite the many small things that are constantly happening in the background. More RAM and more cores only make a real difference when programs can take full advantage of them.
BTW: I would be very happy about a video about how virtual memory works on the Mac, along with load scenarios that show it’s strengths and limits. Exciting topic
Agreed - a deeper dive into how memory management works on mac would be good. You seem to know a lot more about it than I do though, so if you want to add to the discussion, let me know. As it is, your comments are already quite educational and I hope people find them.
Are you able to disable the cores and run the tests with same number of cores?
hello, i am facing a slight electric shock like sensation on the top of lid of MacBook while charging with the given power adaptor itself and tried this in multiple sockets and outlets still the same, people over internet are saying this as tingling and it is normal, but it is causing discomfort to use the machine while charging, my question is, is everyone who have 2 prongs adaptor faces this issue in countries where grounding is done with a third prong ?
I am still happy with my M1, just can't even imagine how powerful M3 will be
$2000 more powerful
@@Tldrx 😂
@@Tldrx 😅
@@Tldrx😂
good one!@@Tldrx
Good,
Thank you!
i’d like to see some comparison about ML projects With Python, i have M1 Pro and i don’t know if i need change!
Please do some Ollama comparisons between macbooks, if you can compare to hosted solutions like runpod that would also be great. I know Mac pros are not the best for local inferance but I don't think they can be beat in a portable platform but I really want to see. If you have a m2 ultra that would also be amazing to see. I'm not sure if I should spring for the Mac 3 max w/full specs or get a cheaper Mac pro (m1,2,3) and wait for the future Mac m3 studio... choices, choices...
@alex Are you running multiple threads on the same CPU core. Because if so, I believe you need to parallelize using both cores AND threads. For example for the M3 Max, you can parallelize using 16 subprocesses, and each subprocess can run like 5 threads ==> which give you 16*5 = 80.
Because calculating prime numbers are a CPU bound task, and languages like Python ( and ruby) can only run one thread at a time ( because of the GIL aka global interpreter lock) so the more threads you spawn, the more contention and context switching you'll get. and the slower it will get
But I think running 16 threads on a language like Java, you won't need to spawn 16 subprocesses, cause the 16 threads will use the 16 cores ( If i'm not mistaken)
it’s one “thread” per core. I misspoke - I should have just said multi-core
hi, could you suggest me which model of macbook should I buy considering that I am a front end developer who has only been working with xcode for about 6 years? I currently work with a 2019 Intel i7 MacBook Pro and I think is the time for an upgrade, definitely 😂
I saw from your video that the basic m3 often gives surprising results but I don't know if the same concept would be valid using xcode.
obviously whichever version I choose the improvement will be notable but I would still like to evaluate the best choice
Thanks to anyone who answers and sorry for my english 🥲
Do you think the base model M3 pro specs 11 core cpu is good enough for video editing?
i think i missed it but how much ram on each machine?
I think base model used more its potential even though it is a small task unlike other pro MacBooks. They used some of their powers, that's why it tooks them more time to complete. it is better for battery when task doesn't require all its power of m3
@Azisk why no Hint benchmarks? Precise and more scientific benchmark for the single core.
Fascinating theory!
You could test and prove your theory on the next benchmark. That would be interesting!
If you have a model with 128 GB I would love to use a case study of a machine learning workflow that uses most of that memory...
Guy is learning about Amdahl's Law in practice :D
I was a life long pc user before I upgraded from my 2016 Windows laptop to 14” M3 Max. The experience is so wonderful. Everything is buttery smooth and compared to before, building code is almost instant!
Most people already watched the video and know the response. I am still watching it. I bet Python's the slowest at counting in primes. :D
Can you make a Unity test for M3 lineup please? I'm thinking upgrading from M1 air but everything works great except Unity.
Ya my best guess would be the logic the cpu/os on when to use a efficiency core vs a performance core. There might some logic on whether the core in spun up or not in that too. With the tasks that are being executed maybe either core would work so there are more times where the tasks hit the efficiency cores. That would be my best guess whether it is right or not is another question :)
Was all those machine plugged in, maybe I missed in the video, but I wonder if the maximum cure model is trying to conserve energy.
Thank you Alex for your video, I think why the basic M3 seems to be faster than the other M3 Pro and Max is due to the latency in the communication that exists between the processors; Then the M3 for having less processors the distribution of execution thread load is less than in the M3 Pro and Max processors. It could be for that reason. Greetings.
Seems like it’s not being optimized for multi core operations and I think the lower end mbp has a higher clock rate on the p cores than the higher end.
Can you do a video on real android project build comparison using m3 versions? Like what you did with the previous versions?
It would be much better if you showed temps also.
Can you help to make a comparison on M2 vs M3 for Unity and creators? Thank you
Thanks for the video Alex. Could u include the screen sizes in the description ie. under: "💻 MacBooks in this video"? This way everybody can see immediately what is being compared. btw: ur the only one actually providing this info in the description, so either way already glad about that!
Sure thing!
I want to know how these handle Unreal Engine 5.3 for game dev.
This is strange; maybe m3 max has an issue with scheduling tasks. Also the tests doesnt contain the CPU frequency, bug causes not to clock them so high, or throtteling. Those should be ruled out.
M3 PRO and MAX have more circuitery to manage more cores and more memory, starting with the fact that those are nX times an M3, so my guess is that light workloads on every core get delayed by those internal additional coordination and memory movement tasks. so M3 single core is faster and it is even faster on multicore when single tasks are small enough. Also in your multicore test maybe (also a guess), the compiled versions or the runtime environment simply is not using all the cores.
Hello Sir, can you please compare Macbook Pro m3 pro 16 inch and lenovo legion 7i Slim i9 13900h with 4070 please sir
Try testing while plugged in
If i buy m3 with 16/512 it would be great for ios/android development?
I'm very happy with the results for Rust, C, and C#.
However, I'm disappointed in Go. It was supposed to be a fast-paced execution language. It is slower than Typscript. It's probably due to the test being small. Larger scale tests have shown it performs fast. Same with Java.
from what i remember in my previous testing, Go wad really fast. It’s done very poorly here perhaps due to the algo used.
Can you guys install anaconda now on your M3 machine? I failed to do so and am wondering whether it’s just for me or
anaconda is still not compatible with M3 yet
This would have been easily solved if you extended the run, right?
All M3s have 16mb L2 per P-core cluster so the standard M3 has more L2 per core than the pro/max.
This is amazing, I was definitely looking for someone who could do this level of nitty-gritty cpu and ram usage & Especially, Docker local container and image build eating up so much resources, while coding and running local dev setup of multiple microservices. (And adding Intellij IDE ) Now chrome/Opera/mozilla with + 25 tabs: would have been more accurate as well.
Thank you, Alex.
Multithreaded and multi core are not comparable, if the compiler does not implement proper multi core support there is no visible difference, also interpreted code is not multi core by default
Looks the best choice is to find a m3 Macbook Air with 24G RAM on the secondhand market
By the way I believe that Alex pulled one on us. This is an old video, just refreshed... He kept mentioning M1s all the way... Darn man, dirty move!!!!!
😂 you got me. Then I just replaced the footage of the M1's with the M3's, and paid someone on Upwork to do VFX on me to give me more gray hair.
May I ask for suggestion to buy this mbp.I am a programmer that mostly work on web development and I have a plan to buy it soon but I have a thought that should I have m3pro with 36gb of ram or the m3pro with 18gb of ram is enough for in long term(3-5 YEARS). Any suggestion?
I would really like to know too
Very strange test results. For example, the description of one of the benchmark variants for Rust provides the following figures for the AMD Ryzen 3900X:
1 thread, byte-storage: 18k
1 thread, bit-storage: 12k
24 threads, byte-storage: 170k
24 threads, bit-storage: 152k
Raspberry Pi 4:
4 thread, bit-storage: 8k
It seems like buying an m3 max is a severe overhead, and it would be better to opt for a Raspberry Pi.
Summary
The video compares the performance of different MacBook models (M3, M3 Pro, and M3 Max) in executing quick frequent tasks related to coding, such as compiling modules and running unit tests. Surprisingly, the base model M3 performs better than the more powerful M3 Max in these tasks.
Highlights
1. The video compares the performance of M3, M3 Pro, and M3 Max MacBook models in executing quick coding tasks.
2. The tests focus on compiling small modules, running unit tests, and making frequent tweaks.
3. The base model M3 performs better than the more powerful M3 Max in these tasks.
4. The video discusses the results of the tests and provides insights into the performance of each model.
5. The conclusion is that the choice of MacBook model depends on the specific needs, whether single core tasks, multi-core tasks, or a mix of both.
Keywords
MacBook, M3, M3 Pro, M3 Max, coding performance, incremental builds, code executions, programming languages.
hey alex can you make battery test video with coding in m3 as you did in m2 series
i have search it everywhere but i cant found
Yeah but do it with 10 tabs of stackoverflow opened, spotify with my lofi playlist on, slack, whatsapp. Also VSC and maybe another ide, beaver etc :D thats a real world test.
It’s the prime number algorithm that’s the culprit here. There are algorithm’s that are non-scalable when it comes to multithreading. This just means that calculating prime number is a faster task than switching/scheduling cores. For an analogy, think about 4 vs 16 equally smart people. The task is to count as fast as they could to 1000. So more cores means there are more people to switch/schedule around thus performing slower.
More Cores != More Performance.
If you have CPU bound workload then -> More Core -> More Context Switch -> More Latency!!
What the heck, can anything with 8GB Ram even run in 2024? This is insane. How on earth can it outperform 64GB, left alone the processor speeds. Im as confused as you are. I wonder if it means that the software is simply not ready for the power in these systems and if it would still be ok to still go for something like the max and wait for the software to catch up. Interesting video thanks man.
BTW... can you run tests on Windows that are loaded on parralells on these systems and see how it performs on the exact same 3 systtems.
m3 air that good for price?
Any info about docker?
I'm not surprise, I have a M2 base model macbook air (15 inches) and there's many moment where it runs so much faster than other device I have (like my desktop with i5 3.8ghz, 16go of ram and a rtx 3060 with 12 go of ram), but for some other things it is a bit slower. I have actually tested the same program wrote in python on m2 and my desktop and m2 is faster. But m3 doesn't bring enough power for me to spend an other 2000$ on it lol But those "M" Macbook are pretty good machine
The machine with more cores can cause "work stealing"
Just what I am interested in, as a lowly hobbyist who’s elated if 10 lines of code compile. But no Xcode? Argh.
It's always a good day when the Schwarzernagger 2.0 is brought out 👍
m2 air vs m3 air same test please.
I think the answer in memory: M3 uses classic 2 channels memory, but Pro and Max uses 3 channels. And it harder to synchronize 3 channels, than 2. The same problem is in DDR5 with it 4 channels in comparison with DDR4 with 2 ones
And, yes, Alex thanks for saving our money 😊😊😊
The results of these tests is similar to I have experienced in solving financial model debt sizing for target IRR..infact my intel core i9-13900 K with 32 GB RAM is solving the model in 65 seconds compared to M1 base MacBook air which solved the model in 47 seconds. I wonder I should stop wasting my money on these high end, shining new machines. The incremental returns are practically zero for me..
base model m3 with 8 gb ram? damn...
is 8gb ram enough for a laptop for a developer job these days?
i am searching for a best option for my new company laptop
it really depends on what you’re doing. generally i would get more than 8GB if the budget allows (especially if you want happy developers)
Are they running on battery or AC? It’s not clear in the video
doesn’t matter. perf is the same
I know whats going on. you failed to conduct the Scientific method properly. You don't even have TOP or the Core Graphs open to see the core use. I'm pretty sure its related to the use of Performance and Efficiency cores, very likely they are not Multithreading properly obviously. Check the graphs thx
Try xcode tests instead to see the real multi core implementation
Im going to buy a new mac for ios development, which mac should i buy m3 or m3 pro?
Can you get the M3 MacBook air as a developer?
yes, just made a video on it
3:06 your friend short who ???
For the majority of the programmers even the performance of the m1 is ok. I have the m1 air with 16gb and 512gb, I can say the only thing that makes me want to upgrade is the screen. I wish it was bigger, brighter and more vibrant. My wet dream would be a 16” OLED panel. Maybe in one of the next iterations. Apple strategy of purely increasing performance to convince m1 owner to upgrade is not a great one because even though the difference is massive, for the real world performance the m1 is still more than ok. Be creative apple!
These tests, unfortunately, don’t accurately represent every model and configuration. You haven’t had the chance to test the 16” M3 Pro with 12 cores and 18-core GPU yet. Some reviewers tested the same M3 Max configurations in 14” and 16” models and observed numerous inconsistencies.
correct. these tests test the models indicated. I don’t have half a million dollars to buy all 83 configurations:)