4 ms·
And nobody writes short lived commands in those because of startup time.
by guappa 3y ago
And nobody writes short lived commands in those because of startup time.
- oblio 3y agoDo a quick test with the latest JVM. Print Hello, world. That's it. Time it. Do the same with Python. The difference is minuscule. People don't build CLIs with them due to cultural reasons (fashion). Developers are creatures of fashion.
- guappa 3y ago> Do a quick test with the latest JVM. java: 031s python: 013s it's 3x slower to start up… it means that any bash script with a loop calling a java command will run 3x slower. 3x slower isn't my definition of minuscule.
- oblio 3y ago> java: 031s python: 013s I'm confused, what kind of time measurement system is this? Are those 31 seconds versus 13 seconds? 0.31s vs 0.13s? If it's the first case, something is wrong with that machine, Hello World should not take that long. If it's the second, are we talking about 0.18s? See below. > it's 3x slower to start up… it means that any bash script with a loop calling a java command will run 3x slower. I don't know how you write your scripts, but in practice most scripts hang waiting for IO (especially network) or waiting for a specific command to process something... > 3x slower isn't my definition of minuscule. Nope, but based on what you've presented so far, unless I'm misunderstanding, it's my definition of "premature optimization".
- guappa 3y agodouble click selection issue. 0m0,031s vs 0m0,013s. > I don't know how you write your scripts, You know how… I put print hello world in them… that was the test you asked for? > premature optimization Not using something that has 3x startup time, for a short lived command is just "common sense". I'm starting to think that the issue here is that you know java but don't know python or C, and you are unconsciously trying to get water to your own watermill.
- oblio 3y agoI haven't written Java as my day to day for about 5 years. Instead I write... Python :-) It's just that I recognize disingenuous comments. Java is perfectly adequate as a language for writing command line tools. You're likely using one of them weekly and don't even know it. Just don't write your Java CLIs using Spring or DI frameworks in general :-)
- fnord123 3y agoPrinting hello world does not show the cost / benefit of a tracing jit that needs to be warmed up over thousands of iterations. And counter example: it takes maven 0.788s to realize I don't have a pom.xml in my PWD and fail a build. It takes meson 0.163s.
- oblio 3y agoMaven versus Meson is purely about architecture, just look at Maven's design. There is a reason I didn't say anything about that aspect of JITs that you mention, it's because it's not relevant to commands which are launched from shell scripts and then exit.
- lambda_garden 3y agoThis is not the gotcha you think it is.
- pjmlp 3y agoRather those that don't know how to use the toolchains don't. JIT caches, AOT have been an option for years. And if you are really motivated, you can write stuff in C just like in Python.
- guappa 3y agoYou're naming things that need handling… which take time to be set up and so on.
- pjmlp 3y agoI am naming things that need learning, pity that it is so big effort nowadays.
- guappa 3y agoThe things you personally already know aren't more worthy of learning just by virtue that you personally happen to have learnt them already. You're just sticking with what you know, calling out the others for not wanting to learn. Not a nice attitude from where I'm at.
- pjmlp 3y agoWe have gotten into a lazy learn attitude society.