I've noticed a big difference between writing to state and writing to settings in an app.

In the simple example above writing to state averages 3ms while writing the exact same value to a setting takes 20ms on average (21, 19, 19, 20). This is very reproducible.
Why is there a such a disparity between the two? Are settings using AtomicState?