News for hackers. Stuff that matters.
Re:Trying Rust for web services by Touche on Thursday October 01, 2015 @01:34PM (#10312915)
> 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?

Re:Trying Rust for web services by acconsta on Thursday October 01, 2015 @02:30PM (#10313454)
>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.

Re:Trying Rust for web services by Touche on Thursday October 01, 2015 @02:40PM (#10313547)
We'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?

Re:Trying Rust for web services by acconsta on Thursday October 01, 2015 @03:07PM (#10313773)
50% C++, 25% Java

http://qr.ae/RP7wXh

At Google's scale, the performance difference between Java and C++ can means millions of dollars in electricity alone.

Re:Trying Rust for web services by Touche on Thursday October 01, 2015 @03:24PM (#10313955)
That'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.

Re:Trying Rust for web services by portmanteaufu on Friday October 02, 2015 @02:02PM (#10320165)
You 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.