Hacker News new | ask | show | jobs
by skybrian 2748 days ago
Could generating a single combined state machine result in code bloat? (Similar to inlining.)
1 comments

The state machine here is a struct given to `poll()` methods that advance the state. It's similar to iterator structs that have `next()` calls.

It could cause code bloat, but in practice these are small functions that get inlined and optimized out to almost nothing (sometimes even the whole struct disappears).