[HN Gopher] M1 MacBook Air hits 900 GFlops in the browser with S... ___________________________________________________________________ M1 MacBook Air hits 900 GFlops in the browser with Safari's experimental WebGPU Author : brrrrrm Score : 82 points Date : 2021-03-03 19:45 UTC (3 hours ago) (HTM) web link (jott.live) (TXT) w3m dump (jott.live) | sxp wrote: | What WebGPU API is this using? If I try on Chrome Canary after | enabling WebGPU under `chrome://flags`, I get an exception on the | `device.createBindGroupLayout` call because "required member | entries is undefined". The API call on the demo page doesn't seem | to match the spec at https://gpuweb.github.io/gpuweb/#GPUDevice- | createBindGroupLa... | | If I change to code to refer to `entries: ...` instead of | `bindings: ...`, I get further, but it fails on a missing | `createBufferMapped` function. Firefox nightly just crashes at | this stage. | brrrrrm wrote: | it's Safari's WSL API, which doesn't work on the other | browsers. There's a bit of a debate about the API (Spir-V vs | WSL/WHSL), you can find some context here: | https://news.ycombinator.com/item?id=22022962 | remoquete wrote: | In 1996 you needed 1,600 sq ft of supercomputing hardware to | reach the same mark. | | https://en.wikipedia.org/wiki/ASCI_Red | zimpenfish wrote: | The M1 MacBook Pro gets just over 1TFlops. | best: 1022.61 gflops [numthreads(2, 16, 1)] | compute void main(constant float4[] A : register(u0), | constant float4[] B : register(u1), | device float4[] C : register(u2), | float3 threadID : SV_DispatchThreadID) { [...etc...] | jeffbee wrote: | There must be some quantization happening here for us to both | get the same gflops to 6 significant digits. | brrrrrm wrote: | I looked into this in the past: it's the timing API (and the | fact that I'm not running that many iterations of the | kernels). Browsers restrict the resolution to prevent side- | channel attacks | andrewmcwatters wrote: | The only thing that upsets me about Apple's M1 performance is | that I don't think it's going to get any better from here in | terms of real everyday speed. | | The phenomenon of everyone being blown away by the M1's | performance is based so much on the fact that developers haven't | built a lot of software on it yet. | | Engineers all over the world will "figure out" how to take this | fast hardware and make it feel slow again. | tdsamardzhiev wrote: | Electron blows my mind every time I open Activity Monitor. How | on the Earth does Spotify manage to use 2GB RAM and 48 threads | for a music player?! | leokennis wrote: | In general, yes, a new laptop hits its peak performance on day | one. Software is most often written to perform well on the | "median machine", and today's top performing computer is | tomorrow's bargain bin underachiever. | | However, the M1 is a huge leap forward. It gives you a maybe 3 | year head start on all other computers. | | So no, in a few years it won't be as revolutionary and fast as | it is today. But I think it's safe to say you can expect an M1 | to last you a good few years longer than a similarly priced | Intel based laptop you can purchase today. | shakezula wrote: | Yeah I don't really understand what the parent comment is | trying to say. They wouldn't have this argument if it was a | new processor from Intel or AMD, just seems like the point is | moot - developers will _always_ utilize available resources, | it doesn't mean that the pursuit of more efficient resources | is not worthwhile. | uyt wrote: | This is just the unfortunate consequence of devs not bothering | to optimize something if it runs fast enough on their own | machine. Stuff that is just on the edge of human perception | (100ms or so?) might become a few times slower on an older | machine and become noticeably laggy. | | I think there are now more tools to help with phenomenon. For | example for web dev, chrome has a built-in cpu/network | throttler so you can simulate a low-end device. | jeffbee wrote: | 1023 gflops on the M1 mini using the kernel in the blog post, | although if I let it run some more it discovers an 8-way unroll | that's a bit quicker (1073). | gerry_shaw wrote: | Ridiculous comparison but 4 Gflops on a 2017 12" MacBook.... | Looking forward to an upgrade this year. | nknealk wrote: | I just upgraded from a 2017 12" macbook to an M1 air. It's | day and night in terms of performance across the board. I | love the fanless design and the M1 air runs cooler than the | 12". Also the keyboard is much better. | nodesocket wrote: | This is promising as Deno made a recent announcement[1] of full | WebGPU support. | | [1] https://news.ycombinator.com/item?id=26323600 | qeternity wrote: | I usually avoid hype. But the M1 is just unreal. I was back in | the office for the first time in months, and since getting my M1 | MBP...my overclocked i5 hackintosh with 4x RAM just disappointed. | It didn't feel slow, but it stopped feeling fast. | SXX wrote: | Too bad it's also hit 200GBW / hour on SSD writes of my 16GB Air | when swapping even though memory usage only went as high as 13GB. | lunixbochs wrote: | Wait do you have an easy repro for this that doesn't go over | ~16GB total memory used? I'm not actually convinced it's caused | by swap. | SXX wrote: | I do have repro for MacOS swapping even though it's can just | be dropping filesystem cache. Obviously 200GBW / hours is | when Windows VM is running and there is 5GB of swap usage, | but again there is still plenty of unused memory. | nindalf wrote: | I'm a cynical bastard, but the M1 MacBook Air is the real deal. I | don't recall being so pleased with a laptop in a long, long time. | I'm yet to find something I could possibly gripe about. | _gtly wrote: | The one thing I'm concerned about are reports of potential SSD | overwear e.g.: [1]. | | 1. https://linustechtips.com/topic/1306757-m1-mac-owners-are- | ex... | stu2b50 wrote: | I think that's mostly FUD. It's just one tool that's | reporting those reads, and the reality is that with modern | storage hardware, the numbers they report can be very | misleading because of additional layers between the OS and | physical drive. | | In practice, I can't imagine the SSD load to be particularly | worse than what the iPhones endure, and I have yet to hear | anyone complain about their iPhone dying from their flash | storage being overused. | lawnchair_larry wrote: | It's definitely not FUD, but it's probably a bug. I'm | surprised at how many people are in complete denial that | this could be happening and are assuming that people aren't | understanding the tooling or something, instead of the | obvious explanation, that it's actually an issue. | SXX wrote: | No it's not FUD and I can absolutely prove this to you. | Just open Activity Monitor -> Disk and then watch disk | writes. Then check how SMART report changes and you'll see | it's exactly match what MacOS itself reports. | | MacOS is heavily rely on swap at least on M1 hardware for | absolutely no reason. | tamrix wrote: | These comments are just too generic and lack detail. Be | cautious of advertising. | Toutouxc wrote: | Apple, one of the most recognizable brands in the world, pays | people to go and tell the nerds at Hacker News that the | MacBooks are good? | | That's way less probable than the machines being actually | good. Which they are. | stu2b50 wrote: | And also trusts the nerds to not immediately post the email | offering them this deal to their blog for the street cred | immediately. | LeanderK wrote: | it's not a new account. The amount of praise is too much to | pull off without being suspicious i think. A few fake | accounts will probably just get accepted, but the more you | use it the faster somebody finds something wrong is my | reasoning. | breck wrote: | I was an Air user for 10 years (2010 - 2020). Got the M1 | MacBook Pro with TouchBar this time around and love it, and | wouldn't go back to Air (but haven't tried the Air M1). Also | got an M1 Mini and love that too. | lostgame wrote: | I have friends who have both due to being developers, and; | honestly - performance between the two is staggeringly | similar. | kelchm wrote: | Completely agreed. I've owned a lot of laptops and other | devices... There's no question at this point that the M1 MBA | has become my all time favorite. | | The only complaint I have is that you can't run two external | monitors off of it, but I have no doubt that the next | generation will address that. | thebruce87m wrote: | A lot of people will still prefer/need two monitors I'm sure, | but if you haven't tried an ultrawide yet I would encourage | you to. I would always pick an ultrawide over two monitors. | function_seven wrote: | Any recommendations on software to tile the display? One | reason I like 2 screens is because things like maximizing | or full-screening still leaves me with the other display | for other windows. | | A single ultrawide would be way better, if I could count on | having 2 virtual displays within. | theturtletalks wrote: | https://github.com/rxhanson/Rectangle works great for me! | ch4s3 wrote: | I'm a big fan of Spectacle App | https://github.com/eczarny/spectacle. | | * Edit* Apparently Spectacle has been discontinued. | trashcan wrote: | Rectangle I think is very similar and actively developed. | Chernobog wrote: | While not a tiling WM, check if Divvy could suit your | needs. You can set up hotkeys to resize windows to parts | of the screen. The screen is divided into a grid. | tomduncalf wrote: | I use BetterTouchTool for this, it lets you set up | snapping so dragging the window e.g. to one side will | snap it to half the width, as well as setting up keyboard | shortcuts. It can also do a million other shortcut type | things which I barely scratch the surface of, cool app! | trashcan wrote: | Try Divvy. I mapped its hot key to option space and then | you can just move the currently focused app somewhere on | its grid. | aminozuur wrote: | Using a DisplayLink adapter, you can extend a second external | display. Still silly these machines they can't do it out of | the box. | herpderperator wrote: | Just be aware that DisplayLink uses the CPU to do this, so | it will increase overall CPU utilisation, and you'll notice | dropped frames occasionally. | SXX wrote: | I kind a like that I can run my primary display at 164Hz | via dedicated Type-C to DisplayPort adapter. Too bad | DisplayLink can't go beyond 60Hz on 2K screen. | agloeregrets wrote: | Bingo. I do this. It's a little buggy every now and then, | you lose unlock with Apple Watch and there is a small | performance cost on one core of the system, but they just | shipped a native driver too. | | Compared to my coworker's 10 core i9 build with over 64GB | of ram, my base model Macbook Air builds our node app in | half the time. | [deleted] | qbasic_forever wrote: | It's like that on the server side too with ARM64. Using AWS | graviton 2 instances has been incredible--faster, cheaper, and | just better in every way for most of my workloads. I think ARM | caught nearly the entire industry flat-footed and asleep. It's | going to be wild to see all the big PC and server | manufacturers, the cloud providers, etc. scramble to have | similar ARM offerings. I can't believe Amazon is a year into a | solid v2 of ARM instances, while Azure and Google don't even | have a beta or v1 on the horizon. | vosper wrote: | We're busy moving stuff AWS stuff to Graviton, too. I'm not | directly involved, but my understanding is it's been all good | (except that not every instance type is available with | Graviton). We're going to save a whole lot of money (we spend | several million per year on AWS) and as far as I know there's | been no performance penalty or any kind of issue. | chubs wrote: | I would love to do the same, but i'm based on Lambda which | i believe is x86-only (would love to be proven wrong!) | jcims wrote: | I'm perplexed at the hot/cold stories of the M1. | smoldesu wrote: | Me too, I ultimately ended up quite frustrated with the | laptop. My suspicion is that it ultimately comes down to your | comfort with MacOS and your workflow. I spent a long time | trying to get my M1 Macbook Air to simulate my workflow on | Linux, but it was never _quite_ there. Sure the thing is | zippy, but it doesn't mean much to me without a proper | package manager or open operating system. | | With that being said, I'm an old-school curmudgeon when it | comes to computers. I'm hard to please, and I don't | necessarily hold it against Apple that they didn't make "the | perfect computer". | | As an aside, is anyone interested in an $850 8gb Macbook Air? | Lightly used with only 70tb written to the drive. | prewett wrote: | I'm curious, what is your workflow? | | I'm asking because I'm assuming your real issues are with | your stated reasons, since MacPorts is a "proper package | manager" (being ported from one of the BSDs) and if you | don't like that one, Brew is certainly popular. And I've | never directly benefited from Linux being an "open | operating system", since I don't write code that interacts | with anything lower-level than the C API, but macOS' Darwin | kernel and many of the binaries are open source. | | I'm kind of old-school (my intro to Unix was a DECStation), | and I find macOS to be plenty Unixy. If I'm not using Xcode | I'm using Emacs (in VI mode). I've never said "I wish I had | <Linux feature>"; actually, it's been rather nice that my | Wifi doesn't break, I don't have to deal with PulseAudio, | it goes to sleep--and wakes up!--when I open and close the | lid, the UI is unified, networking is easy to use, etc. | However, if you run the Linux GUI applications on macOS | it's a klunky experience, so you benefit from finding | native applications. Also, Docker wasn't very pleasant, but | that might have just been Docker; fortunately I've only had | to use it for one project. | | As someone who loves the macOS + Unix experience, I'm just | curious what workflow it doesn't work well with. | smoldesu wrote: | Well, I write quite a bit of GTK, and as you mentioned | that's not necessarily a first-class experience on MacOS, | which I expected and was fine with. It was quite a bit | more frustrating to get the Rust toolchain working | though, and from what I understand it will be a while | before they iron out the issues on the M1. Another | papercut. Then I had issues with binaries disappearing | out of nowhere, similar to the aforementioned git | disappearance. My Rust programs automatically were | removed from PATH, and I still don't know what causes the | issue. As for the package managers, I think Brew and | Macports are both fine pieces of software, but they don't | even come close to how robust and compatible something | like pacman is. Working with the App Store is a | frustrating experience, and I'd prefer to have all my | software managed in one place. | | Maybe it's just different strokes for different folks, | but I'd much rather just clone my dotfiles and have a | Linux workspace up and running in ~10 minutes tops. | Moving my workflow over to MacOS feels like trying to | board a plane while it's taking off, and it doesn't bode | well for my productivity when I can't rely on my tools | even showing up in the first place. | prewett wrote: | My experience (as a user) is that GTK on macOS is | functional at best, and I find it an unpleasant | experience, so macOS is definitely not ideal for that. No | experience with Rust, but it isn't the path the tools | expect, for sure. I've never had a problem with PATH not | working, maybe the new shell in Big Sur is mostly-but- | not-quite like bash? You could try changing your shell to | bash, if you haven't already. | | If you really want an apt-get (never used pacman) kind of | everything-repository experience, though, you're going to | be disappointed on any system that doesn't prioritize a | centralized repository of software. In practice, this | eliminates a commercial OS, and probably commercial | software, since there's no effective way to get a central | repository. The App Store is the closest, but then you | get people complaining you're the gatekeeper, or you get | a free-for-all like Google Play. I think Linux manages | only because the number of people that use it are small | enough that bad actors go elsewhere. | smoldesu wrote: | Well, hopefully you understand where I'm coming from | then. | prewett wrote: | Yep, thanks! | stu2b50 wrote: | That doesn't seem to have anything to do with the M1, | though? It just seems you're uncomfortable with macos. A | new processor isn't going to change that macs run macos, | and if you don't like macos, then you're not going to like | the Mac. | | As a chip, the M1 is an absolutely amazing. | smoldesu wrote: | I mean, I mostly agree with you. It is an issue with | MacOS, and the M1 is a pretty nice package for what it | offers. If I could reliably run Linux on it, I'd be a lot | more excited. Hell, if I could even drive my monitors | with it I'd be mostly satisfied. I guess I'm just one of | those "niche users" at the end of the day. | jedberg wrote: | At first I was skeptical, but I've seen nothing but good things | about the M1. I'm now desperately waiting for the 16" M1. My | 2015 Pro is starting to show it's age. | zoid_ wrote: | It all seems too good to be true, memory and ssd upgrades | aside, the M1 devices seem to be fantastic value for money. | Also waiting for a 16" M1, decided to order a mini in the | meantime. | stu2b50 wrote: | It definitely is. I'm daily driving a Macbook Air, | something which I never thought I'd say. Even beyond the | CPU crunching performance, I'm not sure what part of it is | causing this, but it's just so much smoother for a variety | of misc things. I suspect either better coupling with the | integrated GPU or the unified memory. | | But many little things, like the smoothness of the OS, or | the way that the screen wakes from sleep instantly are just | superior to my much more expensive, and power hungry | desktop. Of course, my desktop can still cream it in a GPU | workload but for programming, it's amazing. | vmception wrote: | I wouldn't be surprised if Apple excludes a random feature | just because people won't need to buy again if they make the | device people actually want. | | You see it in the iPhones and the variant SKUs, and Canon and | Nikon also had been doing this when there wasn't competition | eating their lunch. | qbasic_forever wrote: | There are just going to be more and more pushes to turn | your laptop into a subscription service. Pay apple $100/mo | and always have the latest hardware sent to you on release, | always have the latest version of the OS, always have a | store you can drop off a broken laptop and walk back home | with a perfectly working one that day no questions asked, | etc. | romanovcode wrote: | Same here, really hoping the removal of the touch-bar is not | a myth. MacBook with M1, good keyboard and no touch-bar would | definitely be the best laptop on the market for a looong | time.. | darklion wrote: | Out of curiosity, if they kept the touch bar but as an | addition to a row of function keys, rather than a | replacement, would you still have an issue with the TB? | dbt00 wrote: | Personally I would rather it was gone. My fingers are big | enough that they brush the edge of the touchbar while I | type and volume/brightness/whatever just flaps endlessly | while I'm trying to get work done. I have to use an | external keyboard with that thing. | chrisco255 wrote: | For me, I think it's a novel concept, but it's rarely | used in practice. I like having it as a scrub bar for | video/audio apps or for fine-tuned volume control and | it's nice for emojis. But other than that, I rarely | interact with it. | aminozuur wrote: | I'm impressed by this minimal blogging platform. No author name, | no link to the main page with other blog-posts. Just the post. | Reminds me of telegra.ph. I like it. | dogma1138 wrote: | It's the demo website for Jott https://github.com/bwasti/jott | beervirus wrote: | It's minimal- _looking_ , but the formatting is broken without | Javascript. | bee_rider wrote: | What's broken? It looks fine with noscript blocking | everything. | [deleted] | beervirus wrote: | Comparison screenshot, Firefox on Windows: | https://i.imgur.com/NmToofC.png | brrrrrm wrote: | yea, I haven't spent too much time reducing the markdown | rendering overhead (just pulled a library off the shelf). | | I basically just use this site to upload static text files. | The same text can be rendered a couple ways (e.g. as hmtl, | raw, as code with syntax highlighting) | usui wrote: | I like it too, but one thing that bothers me about online | articles in general recently is the way they hide publishing | date. If the date is there, then it's going to be purposely | bumped across many years to generate more SEO clicks | | Too many times I have tried to look up more recent information, | but the article content clearly shows that it was written a few | years ago due to inaccuracy | | Without reading the article content, I haven't found a way to | discern which articles are actually released recently. Google | Search filters for time does not seem to work as well anymore | as they have found a way around it, but Google Search quality | going down the drain recently and I ranted about it in this | post: https://news.ycombinator.com/item?id=26202941 | brrrrrm wrote: | oh this is an interesting concern. Perhaps I should expose an | endpoint to allow checking the "last edit" date of all notes. | I'll need to think through the privacy/security concerns | about that, though | shakezula wrote: | are you the maintainer of the platform? If so, props! I | also dig the minimal vibe to it, it's a really interesting | approach. | asciident wrote: | Unfortunately when I loaded it it had a major screen repaint | about half a second during load. It would be more minimal if it | didn't have that. | spullara wrote: | I saw that as well. I think it is loading a font. | mbroncano wrote: | iPhone 12 Pro - 397 GFlops!! | | Sometimes it's just hard to realize that we're carrying a super | computer in our pockets ... | tablespoon wrote: | > Sometimes it's just hard to realize that we're carrying a | super computer in our pockets ... | | I mean, that's probably been true since forever. A "super | computer" is only super relative to other machines from the | same era. If you can compare between eras, you could probably | call ENIAC a "supercomputer" and some early pocket calculators | "a supercomputer [ENIAC] in your pocket." | | In other words "a supercomputer in your pocket" is marketing | nonsense. | theandrewbailey wrote: | Not to mention the API and computing model of a supercomputer | is vastly different to a phone. | gnatman wrote: | Twice as fast as the #1 supercomputer in the world 1994-1996, | the Fujitsu Numerical Wind Tunnel. ___________________________________________________________________ (page generated 2021-03-03 23:00 UTC)