# How CircuitPython maintainers recovered firmware space through optimization and reuse

DevFeed: [How CircuitPython maintainers recovered firmware space through optimization and reuse](<https://devfeed.tech/articles/a-mountain-of-ai-math-a-few-precious-bytes-84624.md>)

Original publisher: [Read original article](<https://blog.adafruit.com/2026/10/10/a-mountain-of-ai-math-a-few-precious-bytes/>)

Author: phillip torrone

Published: 2026-10-10T21:52:37Z

Content type: article

Language: en

Sources: [Adafruit Industries](<https://devfeed.tech/sources/adafruit-industries-makers-hackers-artists-designers-and-engineers.md>)

Topics: [Encoding](<https://devfeed.tech/topics/encoding.md>), [implementation](<https://devfeed.tech/topics/implementation.md>), [ClojureScript](<https://devfeed.tech/topics/clojurescript.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [open source communities](<https://devfeed.tech/topics/open-source-communities.md>)

Tags: [artificial-intelligence](<https://devfeed.tech/tags/artificial-intelligence.md>), [assembly](<https://devfeed.tech/tags/assembly.md>), [build](<https://devfeed.tech/tags/build.md>), [circuitpython](<https://devfeed.tech/tags/circuitpython.md>), [compression](<https://devfeed.tech/tags/compression.md>), [firmware](<https://devfeed.tech/tags/firmware.md>), [openai](<https://devfeed.tech/tags/openai.md>)

## AI overview

A review of CircuitPython firmware size work describes how maintainers used compression, code sharing, and other optimizations to recover flash space. An experiment applying a mathematical bound to font packing added no savings beyond ordinary greedy packing. The article also reports that older hand-written Thumb-1 math routines could provide additional space savings, with benchmark results varying by operation.

## Source excerpt

Co-authored by Phillip Torrone and Mikey Sklar. Making CircuitPython fit is a recurring job. Firmware grows, a board gets close to its flash limit or goes over, and maintainers find room through compression, code sharing and other tricks. One Trinket M0 build was eight bytes over. That's one example of a cycle the team has [...]