Rebuilding the desktop only applies to Mac OS 9 and earlier. In OS X it's not done (although if you use Classic, you can still rebuild the Classic desktop, but naturally that does not affect OS X in general).
There is no real equivalent in OS X, but if you're looking for some optimization routines, try running
OnyX or
Maintenance.