If you thought the iPhone Dev-Team was quick to jailbreak new handsets or software, you'll be amazed at the speed of the Android developer community. The Samsung Galaxy S4, which is still only up for pre-order, has already been rooted.
XDA Developers member as 19000 devised the hack, but before you get too excited, there are a few limitations. First off, the root will work on only about half of the Galaxy S4 phones made, due to differing processors. In the US and UK, your new Galaxy phone will come with the quad-core Snapdragon 600 series, while other regions receive the Exynos 5 Octa 8-core processor. In this case, only the latter is rootable.
Secondly, the root is more of a system and guide for rooting, so that could mean the root only works in theory. As with any root, hack your precious new phone at your own risk, and be prepared for the likes of bugs, or even bricking (a good reason to back up everything!).
Don't be too disheartened with your Snapdragon 600 model, though: I'm sure the guys over on the XDA Forums will get a working root soon enough.