Yes, exactly! It seems like immediate-mode GUIs could actually lay out faster than retained-mode: you don't have a scene graph, and the layout code is just normal code that can be optimized by the compiler.
Layout code is always "normal code that can be optimized by the compiler". Why wouldn't it be?
I think you're referring to applying optimizations to static UI with constant data structures, but that can be done with retained mode too, and I doubt it actually is going to help.