4 ms·
> but it's performance is closer to Java, which is a few orders of magnitude slower than C++ A few order of magnitude is an exaggeration. A more reasonable ex
by thethirdone 8y ago
> but it's performance is closer to Java, which is a few orders of magnitude slower than C++
A few order of magnitude is an exaggeration. A more reasonable expectation is a 5x slowdown [1]. Depending on your task, a few orders of magnitude can be correct for JVM based languages; they can have very poor startup times (compared to c++) [2]. However, in startup time, go is not similar to Java.
[1]:https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/go-gcc.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
[2]:https://github.com/bdrung/startup-time https://github.com/bdrung/startup-time
- igouy 8y ago> JVM based languages; they can have very poor startup times (compared to c++) [2] Hello world :-) And is 54.55 ms perceptable? (310.81 ms should be).
- thethirdone 8y ago> And is 54.55 ms perceptable? Its probably noticeable compared to instantaneously in terms of "feeling" different due to lag. However, it is definitely perceptible in the terminal based on my testing using `sleep`. For me (on my computer + monitor) down to 25ms is noticeable. Also importantly, the hello world test shows 2 orders of magnitude simply, but the problem for JVM based languages gets worse for large projects (though not proportionally worse). Real java projects can take a second to launch whereas I haven't worked on a project large enough for that to be true in C++, Go or Rust.
- igouy 8y ago"The basic advice regarding response times has been about the same for thirty years : 0.1 second is about the limit for having the user feel that the system is reacting instantaneously, meaning that no special feedback is necessary except to display the result." https://www.nngroup.com/articles/response-times-3-important-limits/ https://www.nngroup.com/articles/response-times-3-important-...
- thethirdone 8y agoOriginally you asked "is 54.55 ms perceptable?", I say yes. I can tell the difference between 25 ms and 1 ms in my terminal. That said, I don't think it is worth trying to reduce your startup time to the point where you can't tell the computer took time. Getting "the user [to] feel that the system is reacting instantaneously" is a different and more important goal.
- igouy 8y ago> I can tell the difference between 25 ms and 1 ms Maybe you are fooling yourself.
- igouy 8y ago> Real java projects … Can take much longer, and are engineered so that users don't experience a delay. The users interact with a system that is already launched and up-to-speed. So much for Hello world!
- thethirdone 8y agoI was just trying to come up with a real situation where there is a 2 order of magnitude difference. Obviously in many situations you can mitigate the startup time. However, it does lock Java out of being a good replacement for git or other quick command line tools.
- igouy 8y agoNot if jgit is already launched and sitting around waiting for commands.