This event has ended. Create your own event → Check it out
This event has ended. Create your own
View analytic
Wednesday, March 25 • 1:40pm - 3:30pm
Shrinking C Code - Rob Landley

Sign up or log in to save this to your schedule and see who's attending!

Professionally developed code can often be shrunk to less than half its original size with a few simple techniques. For example, when the toybox "ifconfig" command was submitted (written by a professional team of experienced developers), the code was 1504 lines (44268 bytes) in 38 functions. After cleanup, the same code was 521 lines (15963 bytes) in 4 functions.

This is a walkthrough of each of the 26 commits applied to shrink that code to 1/3 of its original size, explaining why each change was made and the underlying principles of code simplification.


Rob Landley

Programmer, se-instruments.com
I used to maintain busybox and a tinycc fork, currently maintain toybox and aboriginal linux, and do nommu.org and j-core.org in my day job at se-instruments.com, which is adding sensors to the world's electrical distribution grid so we can slowly wean cities off centralized generation to distributed solar and wind power. (In the process, we've reimplemented the old superh architecture from scratch now the patents have expired, and released it as... Read More →

Wednesday March 25, 2015 1:40pm - 3:30pm
Ballroom Salon 5/6