That's, given the question, is a really moronic answer. There are means to apply the modern approach of optimizations beyond O0 on C without importing all kind of UB from the language level. You just have to actually…
Those kind of discussions have various effects, some of which I believe to be far from moot. First, they permit that some people even take notice about this situation. Few developers read the standard and even less…
Could have been (should, in some -most?- cases) implementation defined.
Microbenchmark can be very misleading compared to real impact in real programs. Still, the gains allowed by UB of signed overflow (when you are lucky enough that this transformation is actually correct in the context of…
(Technically it is not really an overflow check the problem in that case, but typically more the need of extending an index from 32 to 64 bits because the instruction set in 64 bits do not support indexing with 32 bits…
Large pieces of sw have been able to switch some plateform specific code to other compilers (chrome for windows comes to mind). This is probably way smaller than the whole Windows, but I would not be surprised if some…
Sane compilers should do that. The standard should eventually specify that. But before it does, you can not write portable code that expect that (but hopefully once enough compilers are sane but before the standard is…
Modern DMA is cache coherent (maybe except if you opt-out of it? I'm not even sure you can). It is still costly though.
It's also integrated to new instructions to flush things and wait for them to be made persistent.
I think you can still do non burst transactions and even set masks on byte granularity for writes. Classic processors probably don't do that, though.
VS2012 (I guess this was the compiler, maybe it has been upgraded after) had a quite limited support of C++ 11. Only starting with VS2015 (and then maybe even update 2 IIRC) we had what we can call C++ 11 (for the…
This seems like an interesting book but a few points are dangerous, especially if it is used for teaching. 1. Concurrent access to a variable out of a critical section is qualified as not being dangerous. This actually…
I will never ever buy the "we are forced to do evil things for the greater good" argument. Especially behind real inventors' back. You can't just dictate your own distorted ethical vision just because you are too big.…
HN turns rabid, rightfully so. Even with so-called good motives, which are not even proven. And to be clear, in no way there can be a good motive here: their pledge is limited to Free and Open Source Software, its not…
Of course if you can do that, it's really good. However, sometimes you need low latency.
That very page makes me think device drivers don't choose their DIRQL. Any more precise pointer to how they can do that?
Traditional NT personalities were about the mechanism details. Otherwise it is very current in operating systems to have a common kernel running different kind of userspace using different API - so of course there are…
Needing to wake up usermode is not necessarily an insurmountable obstacle; under Linux you can use a PREEMPT config. Storming a network card having unwanted consequences can also be mitigated: under Linux you have some…
Windows does not really have interrupt priorities IIRC. It kind of sort of have some, but the applicative code (device driver included) can't chose at which level they run their ISR, so its quite random whether or not…
Except WSL has little in common with traditional NT personalities. Traditional NT personalities were a false good idea, and have been a failure in the long term, especially to run Unix workloads -- however this jugement…
I've seen some speculative inlining happening even without LTO (so obviously, in the same TU) with GCC.
For me, personally? I occasionally can write that kind of stuff.
I replaced my Thinkpad by an XPS15 with a small fear that I would regret the Thinkpad, and I absolutely not. Under Windows, the Dell software is far better than the one of Lenovo (far less bloated, and far more…
> Unless there's an instruction you need that doesn't have an intrinsic or you're writing something like a spin lock where instruction ordering is critical and a compiler barrier for some reason is not sufficient,…
A virtual call on a modern processor is typically not very costly. Too much inlining, OTOH, can be (if it generates bloated code that trashes your cache)
That's, given the question, is a really moronic answer. There are means to apply the modern approach of optimizations beyond O0 on C without importing all kind of UB from the language level. You just have to actually…
Those kind of discussions have various effects, some of which I believe to be far from moot. First, they permit that some people even take notice about this situation. Few developers read the standard and even less…
Could have been (should, in some -most?- cases) implementation defined.
Microbenchmark can be very misleading compared to real impact in real programs. Still, the gains allowed by UB of signed overflow (when you are lucky enough that this transformation is actually correct in the context of…
(Technically it is not really an overflow check the problem in that case, but typically more the need of extending an index from 32 to 64 bits because the instruction set in 64 bits do not support indexing with 32 bits…
Large pieces of sw have been able to switch some plateform specific code to other compilers (chrome for windows comes to mind). This is probably way smaller than the whole Windows, but I would not be surprised if some…
Sane compilers should do that. The standard should eventually specify that. But before it does, you can not write portable code that expect that (but hopefully once enough compilers are sane but before the standard is…
Modern DMA is cache coherent (maybe except if you opt-out of it? I'm not even sure you can). It is still costly though.
It's also integrated to new instructions to flush things and wait for them to be made persistent.
I think you can still do non burst transactions and even set masks on byte granularity for writes. Classic processors probably don't do that, though.
VS2012 (I guess this was the compiler, maybe it has been upgraded after) had a quite limited support of C++ 11. Only starting with VS2015 (and then maybe even update 2 IIRC) we had what we can call C++ 11 (for the…
This seems like an interesting book but a few points are dangerous, especially if it is used for teaching. 1. Concurrent access to a variable out of a critical section is qualified as not being dangerous. This actually…
I will never ever buy the "we are forced to do evil things for the greater good" argument. Especially behind real inventors' back. You can't just dictate your own distorted ethical vision just because you are too big.…
HN turns rabid, rightfully so. Even with so-called good motives, which are not even proven. And to be clear, in no way there can be a good motive here: their pledge is limited to Free and Open Source Software, its not…
Of course if you can do that, it's really good. However, sometimes you need low latency.
That very page makes me think device drivers don't choose their DIRQL. Any more precise pointer to how they can do that?
Traditional NT personalities were about the mechanism details. Otherwise it is very current in operating systems to have a common kernel running different kind of userspace using different API - so of course there are…
Needing to wake up usermode is not necessarily an insurmountable obstacle; under Linux you can use a PREEMPT config. Storming a network card having unwanted consequences can also be mitigated: under Linux you have some…
Windows does not really have interrupt priorities IIRC. It kind of sort of have some, but the applicative code (device driver included) can't chose at which level they run their ISR, so its quite random whether or not…
Except WSL has little in common with traditional NT personalities. Traditional NT personalities were a false good idea, and have been a failure in the long term, especially to run Unix workloads -- however this jugement…
I've seen some speculative inlining happening even without LTO (so obviously, in the same TU) with GCC.
For me, personally? I occasionally can write that kind of stuff.
I replaced my Thinkpad by an XPS15 with a small fear that I would regret the Thinkpad, and I absolutely not. Under Windows, the Dell software is far better than the one of Lenovo (far less bloated, and far more…
> Unless there's an instruction you need that doesn't have an intrinsic or you're writing something like a spin lock where instruction ordering is critical and a compiler barrier for some reason is not sufficient,…
A virtual call on a modern processor is typically not very costly. Too much inlining, OTOH, can be (if it generates bloated code that trashes your cache)