This question is related to this question: Do deactivated plugins slow down a WordPress site?
When developing a website with custom functionality for a client, particularly a site that will expect lots of traffic, what is better from a performance perspective. To build the functionality into the theme itself or to build it into a plugin? Or is there any performance difference at all?