News for hackers. Stuff that matters.
Re:Why Is Google Building a New Operating System from Scratch? by fooker on Friday August 18, 2017 @04:34AM (#15044520)
Yeah, just one that will take a decade of compiler optimizations to solve. C and C++ didn't become what they are today overnight.
Re:Why Is Google Building a New Operating System from Scratch? by steveklabnik on Friday August 18, 2017 @10:37AM (#15046542)
We share an optimizer with clang thanks to LLVM; we get to take advantages of those decades already.
Re:Why Is Google Building a New Operating System from Scratch? by fooker on Friday August 18, 2017 @01:08PM (#15047920)
Clang and LLVM have evolved together for a while. It is pretty difficult to get similar results with other LLVM frontends.

You don't have to believe me, just write a reasonably complicated algorithm (say.. a naive SAT solver) with both C++ and Rust (or Swift or $NEW_LANG) and compare the speeds.

Re:Why Is Google Building a New Operating System from Scratch? by steveklabnik on Friday August 18, 2017 @04:08PM (#15049338)
You don't have to believe me either; if you try it, you should generally see that they have the same performance.
Re:Why Is Google Building a New Operating System from Scratch? by fooker on Saturday August 19, 2017 @12:32PM (#15054236)
Here are some fairly realistic examples.

1. Rust : http://benchmarksgame.alioth.debian.org/u64q/compare.php?lan...

2. Swift : http://benchmarksgame.alioth.debian.org/u64q/compare.php?lan...

As for a SAT solver, I was not speaking out of my ass. Here is one try that got a fair bit of attention. https://github.com/mishun/minisat-rust

Re:Why Is Google Building a New Operating System from Scratch? by steveklabnik on Saturday August 19, 2017 @02:03PM (#15054703)
Yeah, we've had some small regressions recently; a few months ago we were usually faster, now we're slightly slower. Still generally close, except for the ones that need explicit SIMD, as that's still being designed.
Re:Why Is Google Building a New Operating System from Scratch? by javajosh on Friday August 18, 2017 @09:10PM (#15050980)
When you say "naive SAT solver" do you mean one where you hard-code a boolean formula with N variables and then check every possible solution (from 0 to 2^N)? If so, does this kind of program accurately characterize the kind of work a kernel does?
Re:Why Is Google Building a New Operating System from Scratch? by fooker on Saturday August 19, 2017 @12:28PM (#15054213)
No, something like the CDCL algorithm without domain specific heuristics and tweaks. I expect that is fairly representative in terms of ..say.. common data structures needed in most systems.