Performance Optimisations For Heterogeneous Managed Runtime Systems