Archive for July 6, 2020

Monday, July 6, 2020

Visual Comparison of macOS Catalina and Big Sur

Andrew Denty:

All of the screenshots below are taken on a default install of macOS and the Catalina version is always on the left. I made a conscious effort not to resize any windows or change any default settings. I haven’t captured everything, but it is a good taste of the changes so far.


H.266/Versatile Video Coding (VVC)

Fraunhofer HHI (via Hacker News):

This new standard offers improved compression, which reduces data requirements by around 50% of the bit rate relative to the previous standard H.265/High Efficiency Video Coding (HEVC) without compromising visual quality.


A uniform and transparent licensing model based on the FRAND principle (i.e., fair, reasonable, and non-discriminatory) is planned to be established for the use of standard essential patents related to H.266/VVC. For this purpose, the Media Coding Industry Forum (MC-IF) was founded. In addition to Fraunhofer Society, the MC-IF now includes +30 companies and organizations. The new chips required for the use of H.266/VVC, such as those in mobile devices, are currently being designed. Dr. Thomas Schierl, head of the Video Coding and Analytics department at Fraunhofer HHI, announced “this autumn Fraunhofer HHI will publish the first software (for both encoder and decoder) to support H.266/VVC.”


AirPods Pro: Rattlegate


So there appears to be a widespread issue with the AirPods Pro: they seem to eventually develop a rattling noise when Noise Cancellation or Transparency is in use. It is believed to be a hardware problem at this stage and fairly widespread.

Apologies for the use of yet another “-gate”, but no one seems to have a consistant name for this issue: terms like “rattling”, “crackling”, “clicking”, “staticy”, “clacking”, “rumbling”, and “crinkling” are just some of the phrases I’ve seen used. I’m hoping to draw some attention to the issue, both so people experiencing it know they’re not alone or doing something wrong, but also to put some pressure on Apple to acknowledge the problem and properly resolve it (instead of people getting replacements that go on to develop the same problem).

The forum thread is still active, currently with almost 200 replies. I haven’t seen this problem myself, though.


Update (2020-07-09): Peter Steinberger:

I‘m on my 3rd pair. I give them until November to break again.

Update (2020-08-07): Philipp Defner (Hacker News):

There’s something very wrong with this product line and just getting a new one every few months is — financially and ecologically — not sustainable as they end up in a landfill.


Wow. I’ve had this same problem for months. I spent over an hour on the phone with Support just trying to describe the problem, until they came to the conclusion that there was absolutely no way to send me new ones or to have me send them my broken ones…because I live in Puerto Rico. The week prior, Apple had sent me a new cable for my phone in 2 days flat, yet when I had a problem, there was nothing they could do about it.

Felix Krause:

I need to get new AirPods Pro every ~2 months so far. Apple always gave me replacements for free

AirPods vs. AirPods Pro

Adam Engst:

Wearing the AirPods Pro doesn’t hurt, but I notice them constantly and breathe a sigh of relief every time I take them out.


I’m torn here—the AirPods Pro have significantly more flexible controls than the AirPods, but they require more manual dexterity than I often have when I’m exercising or doing yard work. But if forced to choose, I’d go with the simple double-tap on the AirPods. It’s just easier.


I’m sure this varies depending on your hand size, but I find that the AirPods case is almost an addictive fiddle—it’s like that smooth stone from the beach that you just can’t put down. The AirPods Pro case, on the other hand, is a little large in my pocket and just doesn’t have the same addictive feel.

Similarly, the cover of the AirPods case snaps shut with an absolutely compelling little thunk at the end, whereas the AirPods Pro case cover… well, it just shuts. There’s nothing wrong with it, and you probably wouldn’t notice unless you were switching back and forth as I’ve been doing. But it’s not as good.

Finally, and you can probably guess where this is going, the AirPods fit into their case so smoothly and with a tiny magnetic assist that makes it seem like they’re happy to jump back in and get a charge.

He came to many of the same conclusions that I did.


Optimizing the Objective-C Runtime in Big Sur

WWDC 2020:

Dive into the microscopic world of low-level bits and bytes that underlie every Objective-C and Swift class. Find out how recent changes to internal data structures, method lists, and tagged pointers provide better performance and lower memory usage. We’ll demonstrate how to recognize and fix crashes in code that depend on internal details, and show you how to keep your code unaffected by changes to the runtime.

Pierre Habouzit:

Also the tagged pointer change allows the piece of assembly I’m the most insanely proud of: the tagged pointer decoding is now much faster in msgSend.

Pierre Habouzit:

This structure holds Writeable runtime metadata for the classes to work at runtime. But only half of that 8-word structure was used commonly.

So we split it, and only allocate the extended part when needed (which is rare) and as Ben mentions, we saved dozens of MBs (given that we save 32B a-piece, yes it means there are several hundreds of thousands of classes initialized system wide)


We found that it’s quite common in certain UI code (but not only) to repeatedly autorelease the same object over and over again. We have implemented a small LRU that is consulted each time an object is autoreleased.


Also, because the runtime caches negative [IMP cache] entries, the speed of a lookup miss is not very relevant, so we can tolerate denser tables.

We added 2-entries hashes. tables up to 8 entries are filled up to 100% and and others up to ~90% (7/8th).

Pierre Habouzit:

[The] motivation for us is that a single method made direct saves you typically 30bytes (that’s what the average cost of an IMP entry used to be).

A monomorphic IMP cached in 100 processes gives you 3k, save 1000 such IMPs you save 3M system wide.

It also saves a lot of binary size.

David Smith:

The idea that saving 30 bytes per process per method is worth doing significant work is not intuitive until you internalize just how many processes are on a typical iOS device and how valuable memory freed up for the frontmost app is[…]

Pierre Habouzit:

[We] have pre-optimized some IMP Caches at build time. How do you think we did that...

Pierre Habouzit:

To beat a hash-table with linear probing, there’s only one thing you can do: a perfect hash table. The problem is, perfect hash tables that exist today in the literature are large, use complex hash functions (the one Obj-C uses is just a mask).

So that was quite the conundrum.

Now there are two ways to get a perfect hash table: either you have a perfect hash function…. or you cheat and make sure that all your keys hash perfectly. Keys for us, are selectors. They live in the shared cache.

Do you see it coming?


Memory savings are … substantial. There’s also a huge speed win during startup because… you don’t have to build those caches anymore and the contention on the runtime locks is reduced.