Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You miss my point - if I am seriously optimizing something I need to be on the same chip not the same ISA.

Graviton2 is a Neoverse core from Arm and it's totally separate from M1.

Besides, Apple don't let you play with PMCs easily and I'm assuming they won't be publishing any event tables any time soon so unless they get reverse engineered you'll have to do it through xcode.



Yes, the m1 isn’t a graviton 2. But then again the mobile i7 in my current MBP isn’t the same as the Xeon processors my code runs on in production. This isn’t about serious optimization, but rather the ability for a developer to reasonably estimate how well their code will work in prod (e.g. “will it deadlock”). The closer your laptop gets to prod, the narrower the error bars get, but they’ll never go to zero.

And keep in mind this is about reducing the incentive to switch to a chip that’s cheaper per compute unit in the cloud. If Graviton 2 was more expensive or just equal in price to x86, I doubt that M1 laptops alone would be enough to incentivize a switch.


That's true but the Xeon cores are much easier to compare and correlate because of the aforementioned access to well defined and supported performance counters rather than Apple's holier than thou approach to developers outside the castle.


We have MBPs on our desks but our cloud are Centos Xeon machines. The problems I run into are not squeezing every last ms of performance, since it's vastly cheaper to just add more instances. The problems I care about is that some script I wrote suddenly doesn't work in production because of BSDisms, or Python incompatibilities, or old packages in brew, etc. Would be nice if Apple waved a magic wand and replaced its BSD subsystem with Centos* but I won't be holding my breath :)

* yes I know Centos is done, substitute as needed.


I just wish my employer would let me work on a Linux PC rather than a MBP, then I wouldn't have this mismatch between my machine and server...


I think this is a slightly different point from the other responses, but this not true: if I am seriously optimizing something I need ssh access to the same chip.

I don't run my production profiles on my laptop - why would I expect to compare how my i5 or i7 chip on a thermally limited MBP to how my 64 core server performs?

It's convenient for debugging to have the same instruction set (for some people, who run locally), but for profiling it doesn't matter at all.


I profile in valgrind :/


This is typical Hacker News. Yes, some people "seriously optimize" but the vast majority of software written is not heavily optimized nor is it written at companies with good engineering culture.

Most code is worked on until it'll pass QA then thrown over the wall. For that majority of people, an M1 is definitely close enough to a graviton.


> typical hacker news

Let me have my fun!


Instruments exposes a fair number of counters, though–what's wrong with using it?


I actually recommend just using 'spindump' and reading the output in a text editor. If you just want to look through a callstack adding pretty much any UI just confuses things.


I am currently working on a native UI to visualize spindumps :(


Well try not to get the user lost in opening and closing all those call stack outline views, I'd rather just scroll in BBEdit ;)


It’s outline views, but I’ll see if I can keep an option to scroll through text too. (Personally, a major reason why I made this was I didn’t want to scroll through text like Activity Monitor does…)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: