Live data from Hacker News

24-core CPU and I can’t move my mouse

randomascii.wordpress.com

201–210 of 509 posts

Re: 24-core CPU and I can’t move my mouse

#201
post #90

Earlier quoted context omitted.

Firefox is C and Rust, so I’m not sure there’s such a direct comparison.

C and Rust? Firefox looks like a ton of C++ to me: https://github.com/mozilla/gecko-dev

I stand completely corrected, don’t know why I had that in my head.

Re: 24-core CPU and I can’t move my mouse

#202
post #45

Full disclosure: I work for Google on Chrome. A Chrome build is truly a computational load to be reckoned with. Without the distributed build, a from-scratch build of Chrome will take at least 30 minutes on a Macbook Pro--maybe an hour(!). TBH I don't remember toughing out a full build without resorting to goma. Even on a hefty workstation, a full build is a go-for-lunch kind of interruption. It will absolutely own a…

> Damn, are we doing this wrong? Give me a tool that's: (i) as fast, (ii) as mature and well supported, (iii) as powerful as C++ and I will switch in a heartbeat. But until there is such an alternative it's futile to complain about the shortcomings of C++, because if you want the powerful, zero-cost abstractions, the mountains of support, and access to billions of existing lines of code, you pretty much have nowhere…

> But until there is such an alternative it's futile to complain about the shortcomings of C++

Then how does C++ improve?

Re: 24-core CPU and I can’t move my mouse

#203
post #200
post #194

Earlier quoted context omitted.

I've heard the same thing a year ago. It didn't happen. See this 2016 roadmap from August 2015 for example: https://blog.rust-lang.org/2015/08/14/Next-year.html

A lot of things did happen. One of them is having the option to check the source which is much faster than compiling. 99% of the time you're compiling code in rust is to run the borrow checker and fix those errors.

That's indeed something where Rust is a lot better than C++. But for many projects (like games or GUI apps) you'll need to iterate with changes which can only be seen in the final product. So you'll need a complete build to run the binary.

Re: 24-core CPU and I can’t move my mouse

#204

Earlier quoted context omitted.

Unfortunately that's not feasible for highly performance-sensitive projects like browsers or games.

> Unfortunately that's not feasible for highly performance-sensitive projects like browsers or games. Bullshit. Code needs to be compiled, but it isn't required to build everything from scratch whenever someone touches a source file. Additionally, not all code is located in any hot path.

Code needs to be compiled, but it isn't required to build everything from scratch whenever someone touches a source file.

Except for C++, where a tiny change in a single object will require recompiling every file that transitively includes that object's header.

Re: 24-core CPU and I can’t move my mouse

#205
post #181
post #132

Earlier quoted context omitted.

Bjarne's made the mistake of having C++ rely on C's linker model, so it meant no modules. Now we can see it as a big mistake, but on those days probably it was one of the reasons why C++'s adoption took off. Also while C lacked modules, most Algol and PL/I derived languages supported them since the late 60's. Swift's case has the issue of mixing type inference with subtyping, so lots of time is spent there. All in al…

OCaml uses C's linker model, and yet still manages to have working Modula-like modules (even with cross-module inlining). So there's an existence proof that it's possible to do it well.

Where can I learn more about it in a high level way instead of delving into source code?

I am curious how it is done in a portable way across all OSes, specially crude system linkers and OSes without POSIX semantics.

For example, I imagine this can be made via ELF sections, but not all OSes use ELF.

Re: 24-core CPU and I can’t move my mouse

#206
post #56

While the issue closing processes slowly is unique to Windows 10, I've found similar situations of not being able to control my OS on RHEL, Fedora, Ubuntu and MacOS. At this point I genuinely believe latency will be the death of general purpose computing. iOS and Android very rarely get out of control. Apple is already pushing iOS devices as laptop replacements. But we lose a lot on these devices with their locked do…

I've seen Android get "out of control" on lower end devices. If you stick with higher end devices and/or first-party the experience is usually very slick. I don't think I've ever had a OnePlus device freeze up or stutter on me, for instance.

My OnePlus X certainly does. When charging or after 10/15 minutes of intense graphical use it starts getting sluggish and unresponsive.

Re: 24-core CPU and I can’t move my mouse

#207

Earlier quoted context omitted.

> Damn, are we doing this wrong? Give me a tool that's: (i) as fast, (ii) as mature and well supported, (iii) as powerful as C++ and I will switch in a heartbeat. But until there is such an alternative it's futile to complain about the shortcomings of C++, because if you want the powerful, zero-cost abstractions, the mountains of support, and access to billions of existing lines of code, you pretty much have nowhere…

> But until there is such an alternative it's futile to complain about the shortcomings of C++ Then how does C++ improve?

Slowly but rather steadily like it has been doing so far.

We are likely getting modules (and reflection) with the next iteration (C++20), which -- if it moves like the last two versions -- will be almost completed and already supported by GCC, VS and Clang in two years. Clang and VS2015 even support modules experimentally already.

Re: 24-core CPU and I can’t move my mouse

#208

Earlier quoted context omitted.

> Damn, are we doing this wrong? Yes, and I mean "we" as in "this industry". I just recently talked to someone whose Swift framework(s) were compiling at roughly 16 lines per second. Spurred on by Jonathan Blow's musings on compile times for Jai[1], I started tinkering with tcc a little. It compiled a generated 200KLOC file (lots of small functions) in around 200 ms. Then there are Smalltalk and Lisp systems that are…

I used to be a C++ guy for 20 years, but won't go back unless absolutely necessary. I mean, it's tempting -- there are some cool new language features. I find that the abstractions are leaky, though, so you still have to understand all the hairy edge-cases. The language has gone insane. I'm 40 -- I want to get stuff done before I die, not play clever games to get around my language / system.

A bit older here.

C++ has been by next loved language after Turbo Pascal, since then I learned and used countless languages, but C++ was always on the "if you can only pick 5" kind of list.

Since 2006 I am mostly a Java/.NET languages guy, but still keep C++ on that list.

Mostly because I won't use C unless obliged to do so, and all languages intended to be "a better C++" still haven't proved themselves on the type of work we do, thus decreasing our productivity.

Because in spite of Swift, Java, .NET and JavaScript, C++ is the best supported option from OS vendors SDKs.

I dream of the day I could have an OpenJDK with AOT compilation to native code with support for value types, or a .NET Native that can target any OS instead of UWP apps.

Until then C++ it is, but only for those little things requiring low level systems code.

Re: 24-core CPU and I can’t move my mouse

#209

Earlier quoted context omitted.

> Damn, are we doing this wrong? Yes, and I mean "we" as in "this industry". I just recently talked to someone whose Swift framework(s) were compiling at roughly 16 lines per second. Spurred on by Jonathan Blow's musings on compile times for Jai[1], I started tinkering with tcc a little. It compiled a generated 200KLOC file (lots of small functions) in around 200 ms. Then there are Smalltalk and Lisp systems that are…

Are you serious? You want to make a product: a Web browser. What technology are you going to choose? The one that makes your browser fast but gives you more work, or the one that makes your browser slower but makes compilation less of a nuisance to you ? It's mind boggling that some would openly say that, hey, who cares about performance that much, these compilation times bother me, the developer. On a browser of all…

False dilemma. You can have both. It's okay if a fully optimized release mode binary takes a bit longer to compile, but compiling a few million lines of code for a debug build shouldn't take more than a second or two.

Also consider the leverage factor. Improvements to the compiler benefit all users of the programming language, so it's worthwhile to invest in high quality compilers.

Re: 24-core CPU and I can’t move my mouse

#210
post #181
post #132

Earlier quoted context omitted.

Bjarne's made the mistake of having C++ rely on C's linker model, so it meant no modules. Now we can see it as a big mistake, but on those days probably it was one of the reasons why C++'s adoption took off. Also while C lacked modules, most Algol and PL/I derived languages supported them since the late 60's. Swift's case has the issue of mixing type inference with subtyping, so lots of time is spent there. All in al…

OCaml uses C's linker model, and yet still manages to have working Modula-like modules (even with cross-module inlining). So there's an existence proof that it's possible to do it well.

Well, that comes with a few caveats:

1. OCaml generates additional information that it stores in .cmi/.cmx files.

2. OCaml does not allow for mutual dependencies between modules, even in the linking stage. Object files must be provided in topologically sorted order to the linker.

3. OCaml supports shared generics, which cuts down on the amount of code replication (at the expense of requiring additional boxing and tagged integers in order to have a uniform data representation).

Post reply on HN