> how could it be changed to get better performance?
Mostly, pay attention and profile to get better performance.
---
For example, if you look at rust, you see that the top(actix) and the middle frameworks have some big distance. The former autor of actix care to get good result, others are just in the step of "have something working nicely"
For native code, D has roughly C++ levels of performance with much simpler/nicer code.