Live data from Hacker News

Apple’s M1 processor and the full 128-bit integer product

lemire.me

61–70 of 180 posts

Re: Apple’s M1 processor and the full 128-bit integer product

#61

Earlier quoted context omitted.

Yes. This is actually a known issue, provided you have an external monitor attached; lots of people complaining about it. The Mac actually wakes up instantly if you lift the screen, but it usually takes 5-10 seconds before it will wake up the external monitor. Worse, for some of us when it does finally wake up the monitor, sometimes it wakes it up with all the wrong colors, and rebooting is the only reliable fix. (an…

For me it's maybe 5-10 seconds for it to wake my Thunderbolt monitor (LG 4K) from "cold". It's much faster if the monitor has been used recently, though, so I always figured it was the monitor that was causing the delay by going into some deep sleep state?

It seems a little faster, but not dramatically so for me, when I'm hot switching between different inputs on the monitor. Definitely I think some of it is just the monitor not being really fast about switching, but I use the same monitor with a brand new 16 inch MBP and it's much faster at triggering the monitor to wake up.

Re: Apple’s M1 processor and the full 128-bit integer product

#62
post #16

Anyone want to take a guess at how long it will be until Apple has their own fab in the US making M1 chips?

Besides the 9 figure capital costs and the multi-year start-up, If you want a cutting-edge fab technology the pool of talent you have to recruit from is pretty small and most of them are outside of the United States.

Re: Apple’s M1 processor and the full 128-bit integer product

#63
post #27

Earlier quoted context omitted.

Yes. This is actually a known issue, provided you have an external monitor attached; lots of people complaining about it. The Mac actually wakes up instantly if you lift the screen, but it usually takes 5-10 seconds before it will wake up the external monitor. Worse, for some of us when it does finally wake up the monitor, sometimes it wakes it up with all the wrong colors, and rebooting is the only reliable fix. (an…

Anecdotal, but I haven’t seen any issues while using DisplayPort rather than HDMI. EDIT: Other than the delay in waking the monitor.

Yeah, I would like to use DP, for sure. A peculiarity of my situation and the devices I need to connect means I can't make that work with just two ports on the laptop. So I use the Apple USB-C PD/HDMI/USB adapter so I can get the ports I need and still charge.

Re: Apple’s M1 processor and the full 128-bit integer product

#64

Earlier quoted context omitted.

They’ve vertically integrated everything else, and they’ve had great success along the way. TSMC has other customers that compete with Apple for production capacity. And there’s geopolitical risk in the region where TSMC (currently) operates.

> They’ve vertically integrated everything else What do you mean by this? Apple does very little manufacturing, they're famous for it.

They’ve vertically integrated basically everything except manufacturing. Even compared to other tech giants who are highly integrated, they do a ton.

Re: Apple’s M1 processor and the full 128-bit integer product

#65
post #16

Anyone want to take a guess at how long it will be until Apple has their own fab in the US making M1 chips?

By buying up the newest nodes, TSMC already gives them quasi-monopoly status. They would need to buy TSMC, but Taiwan may not want to sell it, as it's their most important company by far.

Re: Apple’s M1 processor and the full 128-bit integer product

#66
post #16

Anyone want to take a guess at how long it will be until Apple has their own fab in the US making M1 chips?

In the past, haven’t they made exclusive deals with manufacturers by helping them spin up new factories in exchange for exclusive access for X number of years?

Re: Apple’s M1 processor and the full 128-bit integer product

#67
post #60
post #52

Earlier quoted context omitted.

It's a shame we can't see the rest of the code. What is happening to the result value? Is it being compared to something? Put into an array, or what? All of that code probably totally outweighs what you pointed out here. Or, at least it should. I have a bad feeling it might be being dead-code eliminated, since compilers are super aggressive about that nowadays, but I hope he's somehow controlled for that.

The blog post links to the benchmark... It's repeatedly populating a 20k entry array with the results. godbolt clang compiles it to: .LBB5_2: // =>This Inner Loop Header: Depth=1 mul x13, x11, x10 umulh x14, x11, x10 eor x13, x14, x13 mul x14, x13, x12 umulh x13, x13, x12 eor x13, x13, x14 str x13, [x0, x8, lsl #3] add x8, x8, #2 // =2 cmp x8, x1 add x11, x11, x9 b.lo .LBB5_2 [1] https://github.com/lemire/Code-used-o…

Thanks for the link.

Just staring at the machine code, it looks like the hottest loop for wyrng is about 10 instructions with a store in it. If the processor can do that loop in 1 cycle on average then...holy fuck.

edit: I was looking at similar code generated by clang on my machine. Again, holy fuck.

I don't think the story here is that 64x64=128 multiply is fast, honestly. The real story is the insane level of speculation and huge ROB that is necessary to make that non-unrolled loop go so fast. Everything has to go pretty much perfect to achieve that throughput.

Re: Apple’s M1 processor and the full 128-bit integer product

#68
post #53

Earlier quoted context omitted.

Crypto optimizations are no joke. My Pinebook Pro takes several seconds longer than my T430 to decrypt my keepassxc database.

Why would it need to decrypt a whole database though, and not just the required password? To avoid leaking the key name?

Yes I think it is an all or nothing deal.

Re: Apple’s M1 processor and the full 128-bit integer product

#69
post #35

Earlier quoted context omitted.

Seems likely Taiwan situation will escalate in the next 10 years. Apple may want to get started on the Fab now.

Manufacturing capacity will shift to South Korea, Japan, Malaysia, Singapore, India etc. before the US if that happens. The labor and expertise needed to set up such an operation is just not available here anymore.

My M1 Mac Mini says ‘Made in Malaysia’ on it

Re: Apple’s M1 processor and the full 128-bit integer product

#70
post #53

Earlier quoted context omitted.

Why would it need to decrypt a whole database though, and not just the required password? To avoid leaking the key name?

Yes I think it is an all or nothing deal.

Perhaps it could be a two-level thing then, where you first decrypt e.g. the list of keys and then read the one you want and get a "start/end" offset to read/decrypt just the value for that key from another file. So keys and values are still decrypted, but you don't have to decrypt the whole bundle in one step to get the value.
Post reply on HN