Yes, it’s a macro construct/Qt extension.
As for speed, that’s a bit more complex topic. Faster to code, certainly, but not only that. If you do a plain sequential benchmark, it *might* come out slower, but then we’re getting into deep water - by default foreach provides you with safety by making a copy of the container, so if you meddle with the content, you don’t trip over yourself.
Now, if you’re NOT altering it, you can do foreach (const type &, container), which is roughly on par time-wise. Exact timings will of course depend on particular compilers. But at that point, you already have a flow that is very easy to convert to QtConcurrent::map, which (at least on the desktop, but soon on mobiles, too) unleashes all those sleeping cores and blows a simple ’for’ out of the water.