Optimising architectures for performance, cost, and security