r/AskComputerScience • • Nov 09 '25

If some programming languages are faster than others, why can't compilers translate into the faster language to make the code be as fast as if it was programed in the faster one?

My guess is that doing so would require knowing information that can't be directly inferred from the code, for example, the specific type that a variable will handle

111 Upvotes

90 comments sorted by

View all comments

Show parent comment

14

u/GlassCommission4916 Nov 10 '25

not more than a few hundred lines

And there lies the difference in our definitions. Again, I'm glad that it works for you.

3

u/Eisenfuss19 Nov 10 '25

Very well said. And yes, that is where LLMs excell, at small programs.