Matt Gallagher

@cocoawithlove
764 Followers
85 Following
335 Posts
Software dev. Mostly macOS/iOS/Swift.
Webhttps://www.cocoawithlove.com
GitHubhttps://github.com/mattgallagher

I tried a handwritten assembly kernel, last night. Contrary to the claims in this video, it had *identical* performance to the optimised "Fast Swift" code from my blog post.

I suppose there needs to be an exception that proves the rule: a single line matrix kernel probably *does* optimise pretty well with autovectorization (especially since I was looking at the assembly and optimising to make it better, anyway).

A lot of what I was doing in my latest blog post is tweaking Swift code so the compiler will emit the desired SIMD instructions.

Interesting to watch this clip of Kieran Kunhya (FFmpeg) and Jean-Baptiste Kempf (VLC) talk about how no amount of intrinsics or autovectorization (roughly what I was doing) can get within an order of magnitude runtime speed compared to handwritten assembly for SIMD mathematics.

https://youtu.be/IUo0UwZOaRw

Shocking performance boost of assembly code: ~100x faster than C code | Lex Fridman Podcast

YouTube

I've got a new blog article: "Training an LLM in Swift, Part 1: Taking matrix multiplication from Gflop/s to Tflop/s"

Clunky title, I know. Also, fair warning: there's nearly as much assembly, C and Metal as Swift in the article. So the title is clunky *and* misleading.

But I had fun writing it (the code, not the title).

https://www.cocoawithlove.com/blog/matrix-multiplications-swift.html

I’m currently on the look out for my next bit of contract work. I’m an iOS developer working on apps since 2008. I have a passion for health and fitness apps and have released indie apps. I write about my work and speak at meetups and conferences.

- 🏢 Hybrid or fully remote
- 🌏Melbourne Australia but can travel
- 💸 Contract / Feelance
- 🗣️ https://cuteios.dev
- 📚https://healthkit.guide
- 📱https://healthkitty.app https://ridejournal.app
- 🤖AI coding okay

#iOSDev #getFediHired

Amy is a cute iOS Developer

A girl on the internet, writing, thinking, creating. She often travels the world looking for adventure and excitement.

I wish that I could make my iPhone automatically perform a reverse lookup on unknown phone numbers so it could say "My kids' school" or "There are 8 million spam complaints for this number".

Although it seems to describe everyone's work as "accessible for both beginners and experienced developers". It's practically an end-of-paragraph marker.

And it seems to think almost everyone worked directly on the "The Swift Programming Language" even though that book is published by the Tomb of the Unnamed Tech Writers.

While the details here are all wrong, I'm fascinated by how the answer Apple's Foundation Model provides is at least in the right ballpark. The same pattern repeats with most other obscure bloggers I can name – it knows the subject area but none of the details. It's an interesting insight into the underlying embedding space of a 4GB model.

(Some cherry picking was involved. It didn't support my point to show the one where it thought I worked on a conservative podcast.)

Gosh, the agent crowd are *obsessed* with terminal UIs.

I didn't spend my career building GUIs to drop back to the coding equivalent of a travel booking system TUI. Give me great host platform integration, keyboard navigation and thoughtful, joyful interactions over whatever the hell all of these CLIs are any day of the week.

This tech is all so immature/infantile right now.

I don't think enough people realize how powerful the macOS Settings -> Keyboard -> Keyboard Shortcuts is. Not only can you customise the system shortcuts but you can override any menu command in any macOS app.

I'm pretty sad about the death of the Mac Pro. I owned a 2009 Mac Pro and it lasted a decade (upgraded everything). I stopped using it only because it got damaged. I didn't get another because in early 2019, I *couldn't*.

Between 2012 and 2017, every Mac Apple released was just "not for me" (a lifelong Mac user). This was right in the middle of macOS being neglected in favor of iOS and hardware felt it too. The 2012 MacBook, 2013 Mac Pro and 2016 MacBook Pro were some howlingly bad missteps.