Live data from Hacker News

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

randomascii.wordpress.com

391–400 of 509 posts

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

#391

Earlier quoted context omitted.

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…

Yes, I am totally serious. Where did I write "who cares about performance"? And why do you think any of what I said is going to cost 2x-3x performance? Performance has been either a major part of or simply my entire job for most of my career, and I usually make projects I run into at least an order of magnitude faster. For example by switching a project from pure C to Objective-C. Or ditching SQLite despite the fact…

Furthermore, using a "slow" language for big parts of the code can make the whole project faster: size matters as an input into performance. A compact bytecode executed by a small interpreter thrashes the cache and memory hierarchy a lot less than tons and tons of ahead-of-time-compiled native code.

Use high-level interpreted languages to make your life easier, but also use them to make the page cache's life easier.

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

#392
post #358

Speaking of W10, there was another annoying W10 bug where if you started typing immediately after using the touchpad there was a random delay. If you care about latency and responsiveness, it makes you want to scream at the people who implement these features.

That's not a bug. It's some kind of feature by Symantec that can be disabled in the settings.

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

#393
post #313

Earlier quoted context omitted.

Sure, but it wasn't a "mistake". Stroustrup absolutely wanted a C with classes, and that meant tight integration with C toolchains. Symbol mangling was the clever idea invented to implement that very deliberate choice, not a fortuitous happenstance.

I'm pretty sure @pjmlp is using the word "mistake" to say "a decision that turned out to be bad". English is not my native language, but judging by the ways I've seen it used and what dictionary definitions I can find, it seems quite acceptable. Stroustrup made the decision on purpose and consciously, but it turned out to have disastrous effects.

Yep, you got it right.

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

#394
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…

The obvious solution is to change the c++ specification so that you can modify an inline function without requiring a recompile of every file where it's included

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

#396

I grew up on the Commodore 64 (1 Core, 1 hyper-thread :-), almost 1 MHz clock freq, almost 64 K usable RAM). The machine was usually pretty responsive, but when I typed too quickly in my word processor it sometimes got stuck and ate a few characters. I used to think: "If computers were only fast enough so I could type without interruption...". If you'd asked me back then for a top ten list what I wished computers cou…

The worst is when this happens when you're not doing anything that should be computationally intensive, just entering text in a web app that abuses JavaScript.

Even just entering text into the search bar uses loads of resources. Every character entered does a full search of your history and bookmarks, sends a request to Google to do autocomplete, prefetches the web page you are typing, applies spellcheck, etc.

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

#397

Earlier quoted context omitted.

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…

Yes, I am totally serious. Where did I write "who cares about performance"? And why do you think any of what I said is going to cost 2x-3x performance? Performance has been either a major part of or simply my entire job for most of my career, and I usually make projects I run into at least an order of magnitude faster. For example by switching a project from pure C to Objective-C. Or ditching SQLite despite the fact…

A good example of the architectures you are describing are Android and UWP.

Although the lower levels are written in a mix of C and C++, the OS Frameworks are explicitly designed for Java, C# and VB.NET.

Trying to use C or C++ for anything more than moving pixels or audio around is a world of pain.

The Android team even dropped the idea of using C++ APIs on Brillo and instead brought the Android stack, with ability to write user space drivers in Java (!).

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

#398
post #204

Earlier quoted context omitted.

> 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.

I think that only re-linking should be required if you only change source files and not headers. Headers implicitly convey are the sizes, inheritance and other stuff that dependencies need for compilation.

I suppose you could have some extra aggressive optimizations that force inlining, but I haven't seen a need for this, even in game dev.

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

#399
post #285

Can take the alternate approach - Run your builds in a hugely underpowered VM, and wait much longer.. your regular usage will be largely unimpacted, although the builds take longer. Source: Currently running a ~1000 package dpb(1)[1] build of my needed openbsd ports on a dual-core KVM machine hosted on a 8-9 year old amd64x2 2.2ghz. 3 Days and counting, will probably be done around next weekend. From there, increment…

Out of curiosity why do you keep such an old machine around? I have found that newer machines can be had for free, and 7-year-old Xeon servers can be had for <$200 from IT recyclers.

The electricity consumption numbers are also relevant.

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

#400
post #377
post #296

Earlier quoted context omitted.

It's not difficult to spit out machine code at a high pace. TCC is one example given by the grandparent, but it's certainly not the only fast compiler out there. Languages like Turbo Pascal were designed for rapid single-pass compilation, way back in the 80s. A million lines of code represents an AST with a few million nodes in it, which compiles to a binary of a few megabytes. To do this we have computers with a doz…

Tell me, how do you do mutual recursion in a single-pass define-before-use compiler?

Easy, stack trampoline (or skyscraper a la cheney on the m.t.a)
Post reply on HN