News for hackers. Stuff that matters.
Re:Apple’s 2½ year old iPhone 12 is 6% faster than the new S... by yamtaddle on Thursday February 09, 2023 @02:14PM (#34729564)
iOS has historically done a lot better with less RAM (as far as how snappy and responsive it feels) than Android. Dunno if that's still the case, but it very much was for years and years.
Re:Apple’s 2½ year old iPhone 12 is 6% faster than the new S... by sliken on Thursday February 09, 2023 @02:47PM (#34730204)
I believe it's still true. Apple's swift/obj c++ don't use garbage collection. Android default java/kitlin does, so android is inherently more memory intensive.
Re:Apple’s 2½ year old iPhone 12 is 6% faster than the new S... by kaba0 on Friday February 10, 2023 @01:57AM (#34736527)
Ref counting is garbage collection. But it trades off better throughput for less memory overhead that is true.
Re:Apple’s 2½ year old iPhone 12 is 6% faster than the new S... by stolsvik on Monday February 13, 2023 @07:47PM (#34783516)
You keep saying that, but it is not true.
Re:Apple’s 2½ year old iPhone 12 is 6% faster than the new S... by kaba0 on Tuesday February 14, 2023 @01:44AM (#34786235)
Tracing GCs get to amortize their deletion costs over time - in theory a tracing GC with two equal spaces (thus at least 2X overhead) can just copy used data to the currently unused partition and switch over, later overwriting the former region. This combined with thread local allocation buffers where an allocation is only a pointer bump is a really great combo. There are many smart modifications, but this auto-defragments as well.

Now if you want general ref counting you have to use atomic counters, and those will trash your performance on modern machines beyond fixing. And then we didn’t even mention that big object graphs will have to be recursively freed, an overhead that can’t be amortized in this case. Oh and you do need a tracing step one way or another to free cycles.

Re:Apple’s 2½ year old iPhone 12 is 6% faster than the new S... by stolsvik on Friday February 24, 2023 @01:00PM (#34927552)
I was referring to the “ref counting is garbage collection”. You do however seem to know your ways around a GC, so it seems we’ll just have to disagree on the ref counting == GC part. (And yes, GC rocks, but seriously bloats the memory requirements)
Re:Apple’s 2½ year old iPhone 12 is 6% faster than the new S... by etempleton on Thursday February 09, 2023 @03:16PM (#34730703)
MacOS manages better than Windows as well. Apple seems to have really good memory management. I don’t know enough to know what they are doing, but in day to day tasks it always feels like a Mac/ iPhone needs half as much memory to feel responsive. Memory intensive work, such as video editing still require what they require though.
Re:Apple’s 2½ year old iPhone 12 is 6% faster than the new S... by yamtaddle on Thursday February 09, 2023 @03:25PM (#34730851)
Apple's dev culture just seems to have more give-a-shit about performance (and, relatedly, battery life) than anyone else's. See also: Safari, their office suite programs, Preview which is the first program I've seen that handles PDFs very well and doesn't also feel super-heavy (on the contrary, it's very light), Terminal which is more-or-less competitive input-latency-wise with the best available anywhere else and is way better than average, and so on.
Re:Apple’s 2½ year old iPhone 12 is 6% faster than the new S... by kaba0 on Friday February 10, 2023 @01:56AM (#34736522)
While I’m not an ios dev, from what I gathered ios is just way more aggressive at telling background apps to save their state and then stopping them. This can sometimes be very frustrating (ishell basically being blank if one didn’t touch it for like 10 seconds), but is great for responsiveness, battery life and longevity.

Unfortunately this can be hardly retrofitted to other OSs since it requires cooperation from the apps.

Re:Apple’s 2½ year old iPhone 12 is 6% faster than the new S... by nomel on Thursday February 09, 2023 @03:25PM (#34730850)
Related, I'm using an M1 MacBook with only 8Gb, and I don't understand how it's doing what it's doing.
Re:Apple’s 2½ year old iPhone 12 is 6% faster than the new S... by RattlesnakeJake on Friday February 10, 2023 @08:03AM (#34739100)
2013 MacBook Air with 4GB, and I still ask the same question ten years in.