I think the ecosystem is more important than the programming language. You can choose any language, if you bloat your application with 20MB JPEGs, 3rd party API requests that take tens of seconds or implement animations that take seconds to complete, the language won't matter that much.
I am not sure if there are languages that come with a fool-proof ecosystem when it comes to implementing things and making them fast. The only one I can think of are UI-based applications builders, that only allow you to add to your app only a limited subset of UI elements or features.
I'd say a big factor to include here is the choice of language. Going from Python/Ruby to Kotlin/Rust/etc could probably yield a speed up of over 10x / over 1000%.