Mark Cerqueira

@markcerqueira.bsky.social

Dad; Husband; Android, iOS, Web, API Foundations at Pinterest. Carriers and galera aficionado. Pokémon Go (IGN marktronic). 🇺🇸 🇵🇹

PSA: if you write v.pow(2f) (also .pow(3f)) on Android, please write v * v instead. pow() is a (relatively) expensive function call that won't get optimized away (yet). On a Pixel 6, pow(2f) is 5x slower than a multiplication. For long expressions, use inline fun square(v: Float) = v * v

lol optimizing bluesky feed perf reminds me how misleading so much js framework benchmarking is; all the cost i’m trying to fix now is either about avoiding layout shifts, or about doing stuff as lazily as possible. very little is related to update cost