Login
You're viewing the mister.computer public feed.
  • Nov 10, 2026, 12:50 AM

    🏛️

    I have released a new Swift package: Derived Keys.

    It makes it easy to cache results of computations based on the properties that affect them—dependency-based memoization.

    I frequently use it to build performant UIs that cache view sizes based on model properties that affect the size.

    github.com/kylehughes/swift-de

    💬 1🔄 0⭐ 2

Replies

  • Nov 10, 2026, 12:50 AM

    This comes right out of Information Superhighway. I had GPT-6 Astra Max build a spec based on my existing implementation, and then had Claude build it in my software factory.

    It’s a technique that I have used for my whole career to achieve the best possible scrolling performance.

    💬 1🔄 0⭐ 2
  • Nov 10, 2026, 12:50 AM

    e.g.

    If the height of a cell in a collection view is affected by the number of lines of text, you can use the text content as a hash key to store the result of computing the number of lines, and then the number of lines as a hash key to store the view size. You hardly have to measure any views.

    💬 0🔄 0⭐ 3