[eluser]TheFuzzy0ne[/eluser]
I would have thought it would be obvious which is faster. index.php is the first file to be loaded. If you redirect from there, it will be the ONLY file to be loaded.
With hooks, your hook file happens to be the 10th file that's loaded.
Common sense suggests that just putting it into the index.php file will out-perform using hooks. With that said, any difference is fairly minimal. You're probably talking about less than 0.01 seconds, depending on the speed and load of your server. Hooking also allows for cleaner separation, which definitely isn't a bad thing.
Hmm... Common sense... I wonder why they call it "common sense"? It seems to be a lot less common than one might expect... They should call it "rare sense"!
So to summarize, hooking offers cleaner separation of code at the cost of a barely noticeable hit in performance. But (IMHO), it's not bad practice to add extra logic to your index.php file that's required by the entire site, so long as you leave your ./system directory alone, and don't edit below the
Code:
// --------------------------------------------------------------------
// END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE
// --------------------------------------------------------------------
line.