Twitxy Saved

Yan

@yanewm

🦊 Kotlin @ JetBrains. 日本語OK。Play the guitar (a bit). Interested in Zen. Inspired by music. Welcome.
Japan yanex.org Joined April 2009
108 Following 968 Followers 37K Posts

Latest posts 5

Yan @yanewm
And then spend 3 million instructions to show it to the user 10 layers above in a Chrome wrapper?
CPU3命令でうるう年を判定する最適化。

bool is_leap_year_fast(uint32_t y) {
return ((y * 1073750999) & 3221352463) <= 126976;
}

A leap year check in three instructions
hueffner.de/falk/blog/a-le…

GCCの実装でも取り入れられた。
github.com/gcc-mirror/gcc…
View quoted post on X
Yan @yanewm
That’s one of the reasons why I chose AppKit over SwiftUI for Marta.
Jacob Bartlett Verified account @jacobtechtavern Mar 17
I compared UIKit and SwiftUI performance with the most ridiculous scroll view possible.

Memory usage wasn’t dramatic, but was interestingly spiky. Perhaps due to the different numbers of gifs and different resolution of the images rendered on each cell.

When it came to profiling peak memory and energy usage, I expected UIKit to yield the same kind of results I saw in SwiftUI: We’re still displaying an enormous number of elements, animating them the same, and these images are not any bigger or smaller, right?

Now don’t I look silly.

Memory usage hovered around 92MB for UIKit, compared to 248MB in SwiftUI.

Read my scientific performance comparison right here 🧪 blog.jacobstechtavern.com/p/swiftui-vs-u…
View quoted post on X