5 ms·
> That's too categorical a statement. It depends on a lot of things. I didn't mean it to be. Of course there are extreme cases where GC pauses are unacceptable
by Touche 11y ago
> That's too categorical a statement. It depends on a lot of things.
I didn't mean it to be. Of course there are extreme cases where GC pauses are unacceptable on a web server, but those are relatively rare. Even Google mostly uses Java (although they are heavy C++ users, is it for their web servers?).
There are always extreme cases, which is why I asked the question.
> My experience in switching from slow languages to fast languages, even doing the same IO, is that you do tend to see real performance gains unless your page was absolutely trivial. Slow languages really are slow in practice.
Slow vs. fast is not black and white. Is Go slow? Is Lua slow? I Java (on a warmed up JVM) slow?
We're talking about GC vs. non-GC languages here. Do you really see a difference in performance gains?
- deleted 11y ago[deleted]
- acconsta 11y ago>Even Google mostly uses Java I'm not so sure about that. The core services (e.g. Search, Maps, Earth, Big table, Map reduce) seem to be C++. Ads is possibly an exception.
- Touche 11y agoWe're talking specifically about the web application servers here. I wouldn't be surprised that something like Search is C++, it's one of the most visited pages in the world. But I haven't heard specifically that it is. I don't think it's any secret that Java is huge Java users. If not web servers, then for what?
- acconsta 11y ago50% C++, 25% Java http://qr.ae/RP7wXh http://qr.ae/RP7wXh At Google's scale, the performance difference between Java and C++ can means millions of dollars in electricity alone.
- Touche 11y agoThat's the amount of code in their repo which covers a lot more than web application servers. This is an unnecessary tangent though, as I've said throughout this discussions, there's extreme cases and no doubt Google is likely one of them. But we're talking about common use case, to which I still haven't seen any evidences that GC pauses are a deliberating factor.
- portmanteaufu 11y agoYou may already be familiar with this and are specifically concerned with GC. However, for what it's worth, it's not just the absence of garbage collection that makes languages like Rust and C faster. A huge piece of their performance is the level of control that they offer over types' layout in memory and where things get stored. Rust's preference for stack allocations and the absence of a mandatory per-Object size overhead (a la Java) really allow it to shine.