4 ms·
>Great, but unfortunately, even when compiled, the startup overhead is about half a second, which makes it unsuitable for many applications So why python is th
by high_na_euv 1y ago
>Great, but unfortunately, even when compiled, the startup overhead is about half a second, which makes it unsuitable for many applications
So why python is this popular in this domain?
- jbverschoor 1y agoPython has replaced Java in many universities, and is used in other domains than CS. Python caches compiled versions by default. (__pycache__) and simply starts faster. Python is more a scripting language, similar to Ruby. Swift was late to the game, and is quite strict. *performance is a feature* And in particular perceived performance and startup performance (“lag”) It’s one of the reasons for the success of Chrome, MySQL, Mongodb, and many others.
- ptx 1y agoA Python script can start and finish in less than 10 ms on my machine.
- high_na_euv 1y agoEven with installing dependencies? Because that's what dotnet run does
- ptx 1y agoDoes dotnet install the script's dependencies all over again every time you run it? The quoted part was about the 0.5 second startup overhead, which I figured did not include installing the dependencies. Anyway, lots of Python scripting can be done with the standard library, without installing any dependencies. I rarely use third-party dependencies in my Python scripts.
- high_na_euv 1y ago1. I don't think so, but it may check it if is needed? I don't know. 2. Same can be said about C# which has really strong and well designed (APIs) standard lib.