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

-1

u/Federal_Decision_608 Nov 10 '25

If you're writing scripts longer than that, you're a shitty programmer.

6

u/mxldevs Nov 10 '25

Most applications are larger than hundreds of lines of code.

4

u/rigterw Nov 10 '25

Why? Because AI stops working after that limit?

3

u/JorgiEagle Nov 10 '25

I think you mean functions not scripts.