I think they are also contributing a lot of the new libc++ hardening features that have been landing: https://libcxx.llvm.org/Hardening.html IIRC, production chrome ships with Extensive hardening.
They also roll out massive code changes via automated clang rewrites. Recent examples are replacing all raw pointer members with their raw_ptr wrappers that bring some additional safety. They also switched from absl::optional to std::optional in one swoop.
If you haven’t done it before, take a browse through //base sometime, it’s got a lot of well commented code to learn from. You’ll see they’re already using c++20 concepts and requires clauses in a number of places.
An example: how in QML the Repeater element works inside an ObjectModel.
We contribute upstream a bit and we had documentation updates to clarify the stability of pointers to QHash elements rejected. ¯\_(ツ)_/¯
Personally, we superbuild bleeding edge Qt with the source code in tree so that it’s trivial to go to definition and inspect behavior. Makes the experience substantially better.
This was getting very frustrating, at various points I tried every other option online (including restoring bios to Intel Baseline settings), etc.
I came across Keean's investigations into the matter on the Intel forums:
> I think there is an easy solution for Intel, and that is to limit p-cores with both hyper-threads busy to 5.8GHz and allow cores with only one hyper-thread active to boost up to 5.9/6.2 they would then have a chip that matched advertised multi-core and single-thread performance, and would be stable without any specific power limits.
> I still think the real reason for this problem is that hyper-threading creates a hot-spot somewhere in the address arithmetic part of the core, and this was missed in the design of the chip. Had a thermal sensor been placed there the chip could throttle back the core ratio to remain stable automatically, or perhaps the transistors needed to be bigger for higher current - not sure that would solve the heat problem. Ultimately an extra pipeline stage might be needed, and this would be a problem, because it would slow down when only one hyper-thread is in use too. I wonder if this has something to do with why intel are getting rid hyper-threading in 15th gen?
From: https://community.intel.com/t5/Processors/14900ks-unstable/m...
Based on this, I set a P-Core limit to 5.8 in my bios and after several months of daily-use building Chromium I can say this machine is now completely stable.
If you're seeing instability on an i9 14900k or 13900k see the above forum post for more details, and try setting the all-core limit. I've now seen this fix instability in 3+ build machines we use so far.
There's something unique about the workload of ninja launching a bunch of clang processes that draws this out.
On my machine, a clean build of the llvm-project would consistently fail to complete, so that may be a reasonable workload to A/B test with if you're looking into this.
The user quoted above was running gentoo builds on specific p-cores to test various solutions, ultimately finding that the p-core limit was the only fix that yielded stability.
This was getting very frustrating, at various points I tried every other option online (including restoring bios to Intel Baseline settings), etc.
I came across Keean's investigations into the matter on the Intel forums:
> I think there is an easy solution for Intel, and that is to limit p-cores with both hyper-threads busy to 5.8GHz and allow cores with only one hyper-thread active to boost up to 5.9/6.2 they would then have a chip that matched advertised multi-core and single-thread performance, and would be stable without any specific power limits.
> I still think the real reason for this problem is that hyper-threading creates a hot-spot somewhere in the address arithmetic part of the core, and this was missed in the design of the chip. Had a thermal sensor been placed there the chip could throttle back the core ratio to remain stable automatically, or perhaps the transistors needed to be bigger for higher current - not sure that would solve the heat problem. Ultimately an extra pipeline stage might be needed, and this would be a problem, because it would slow down when only one hyper-thread is in use too. I wonder if this has something to do with why intel are getting rid hyper-threading in 15th gen?
From: https://community.intel.com/t5/Processors/14900ks-unstable/m...
Based on this, I set a P-Core limit to 5.8 in my bios and after several months of daily-use building Chromium I can say this machine is now completely stable.
If you're seeing instability on an i9 14900k or 13900k see the above forum post for more details, and try setting the all-core limit. I've now seen this fix instability in 3+ build machines we use so far.
https://www.propublica.org/article/train-derailment-long-tra...
The article doesn't even really explain the modern push - the difference between threads and fibers, or between actors and concurrency domains, or most critically between x86 and ARM in their memory models.
Would someone please write that article?
libdispatch source code is an enlightening read for those interested in diving deeper into the C Runtime powering Swift concurrency.
I find myself reaching for Swift as the default for a lot of things rather than Rust, especially with the advent of C++ Interoperability and the new Swift embedded stack and ownership model.
The only thing I really need is a UI story on other platforms, but it’s an area Rust is lacking great solutions too. I suspect the C++ interop might eventually make Swift have great Qt bindings to compete with PySide as an accessible way to make multi platform UIs.
https://github.com/qt/qtdeclarative/tree/dev/tests/manual/he...
I’ve kicked around with the C++ interop a few times. Projects like Qt that use raw pointers extensively seem hard to expose. Ended up having to wrap Qt classes to model as a value type which was straight forward but it’s not nearly as seamless as the Objective-C++ experience
Really wish they would invest in getting QML LSP to a working state. It’s been in development for well over a year now and still not used by Qt Creator itself. qmlls is missing proper formatting support, syntax aware highlighting (although we paid a contributor to land this upstream over a year ago, the PR is still pending). It has unusable latency compared to other LSPs, the list goes on.
The next post I have planned goes over how to use the CFRunLoop to post cross-thread tasks, and will include some benchmarks comparing with an alternative C++ lock-free SPSC task queue implementation.