I've seen some misleading statements about cooking rock and sand (I can't see how cooking sand would even work), so I thought i'd make a couple of points here:
Dunk and Swish! This is key. Rock cooking is more than just chucking some rocks in the dark for a while. You're wanting to purge the rock of nutrients as fast as possible. Part of this is remove bacterial detritus and export the waste. If you're not dunking and swishing, you're not really cooking the rock.
Timeframes, this is like asking how longs a piece of string. Rock cooking is done when it's done. It's dependent on a few variables, like how filthy the rock is, how often you dunk and swish, how clean you keep the surrounding water, etc It could take anywhere from several weeks, to several months. There's no set timeframe. When it's done it's done.
Sand cooking, i'd like to see some rational behind that, I can't see any point to it.
Cooking, done right, is a great way to completely avoid the algae cycles some people consider a normal succession in starting a new tank.
Layton