I really dislike answers like this (which very predictably appear in every language vs language discussion).
The "just use good algorithms" avoids the core argument about language's overhead, and changes the topic to a smug "I know algorithms, and everyone using the other language is just an uneducated noob".
General-purpose languages should all have ability to use proper algorithms and data structures, so when someone mentions slowness of a language, it's not a complaint about programmers being uneducated.
However, if some algorithms or data structures actually are pathologically hard in some language, that is a language design or implementation problem, not a "bad programmers are bad" problem either.
Even when programs are properly optimized in the big-O sense using data structures that your professor would approve of, languages can still add overheads. Linear overheads still count, e.g. one language can sort 2x faster than the other, and that doesn't mean the other must be using bubble sort.
Knowing which languages are better for what class of algorithms and data structures is part of it.
The math theory behind algorithms and data structures is only half of the story, the other half is understading how they map to each programming language specifically, and how to use profilers, not guessing and hunches.