This paper presents efforts to improve the boundary efficiency and accuracy of a compact finite difference scheme, based on its composite template.Unlike precursory attempts the current methodology is unique in its quantification of dispersion and dissipation errors, which are only evaluated after the matrix system of equations has been rearranged for the derivative. This results in a more accurate prediction of the boundary performance, since the analysis is directly based on how the derivative is represented in simulations.A genetic algorithm acts as a comprehensive method for the optimisation of the boundary coefficients, incorporating an eigenvalue constraint for the linear stability of the matrix system of equations. The performance of the optimised composite template is tested on one-dimensional linear wave convection and two-dimensional inviscid vortex convection problems, with uniform and curvilinear grids. In all cases, it yields substantial accuracy and * Corresponding author, Email address: J.M.Turner@soton.ac.uk * * Current address: Department of Mechanical and Aerospace Engineering, University of Strathclyde, Glassgow, G1 1XQ, UK Preprint submitted to Computers & Fluids August 16, 2016 efficiency improvements while maintaining stable solutions and fourth-order accuracy.