Remix.run Logo
oguz-ismail2 16 hours ago

So assembly is the slowest language?

hmry 15 hours ago | parent | next [-]

Depends. If it takes an assembly programmer 8 hours to implement <X>, can an equally proficient Python programmer spending 8 hours to implement <X> create a faster program?

Let's say they only need 2 hours to get the <X> to work, and can use the remaining 6 hours for optimizing. Can 6 hours of optimizing a Python program make it faster than the assembly program?

The answer isn't obvious, and certainly depends on the specific <X>. I can imagine various <X> where even unlimited time spent optimizing Python code won't produce faster results than the assembly code, unless you drop into C/C++/Zig/Rust/D and write a native Python extension (and of course, at that point you're not comparing against Python, but that native language).

IshKebab 10 hours ago | parent | prev [-]

Maybe it's best to think of it as an effort-performance graph. For a given amount of effort what performance do you get?

Assembly is going to give you pretty great performance generally, but the line only starts when you get to "ridiculous effort"!