Skip to content
Andrew Voirol
WorkLogAboutContact
HomeWorkLog

AboutContact

✦ Just one prompt away from figuring it all out.

Friday, July 17, 2026edge-ai-lab-development

MLX was running 12.8× slower than it should have been — both schemes were on Debug

DebuggingApple SiliconBenchmarks

MLX inference was crawling at 1.8–9.1 tok/s. The fix was one word in Project.swift: .release. Both app schemes were hardcoded to .debug, which meant SPM packages — including mlx-swift — compiled at -O0 with ~400 C++ assert() calls in hot paths. GGUF and LiteRT-LM were completely unaffected because they use precompiled C/C++ frameworks that ignore the scheme's optimization level. Created a new "Edge AI Lab (Release)" scheme, rebuilt, and MLX jumped to 116.2 tok/s. That's a 12.8× improvement from changing a build configuration. The initial 116 tok/s reading looked like an outlier — steady-state settled at 56–63 tok/s, which is still the fastest engine in the app. Three hours of profiling to find a one-line root cause. Classic.

← Previous

Accessibility first: Reduce Motion, transition tokens, and killing animation debt

Next →

You don't have to scrape HuggingFace — just ask the Hub API


Andrew Voirol

Builder, hacker, shipper. Currently leaving localhost.

Navigate

WorkBuilder’s LogAboutContactRSS Feed

Connect

X / TwitterGitHubLinkedIn

© 2026 Andrew Voirol✦Just one prompt away from figuring it all out.