Re:A Usable C++ Dialect That Is Safe Against Memory Corruption
by kllrnohj on Thursday March 15, 2018 @09:27PM
(#16597921)
1 instruction != 1 clock cycle. In particular that would utterly kill the usage of unique_ptr on things like small embedded processors or microcontrollers that either lack speculative execution entirely or do not have the level of branch predictor & speculative execution capabilities of a high-end x86 or ARMv8 CPU.
Re:A Usable C++ Dialect That Is Safe Against Memory Corruption
by nobugs on Friday March 16, 2018 @04:42AM
(#16599379)
FWIW: in general, simpler controllers (especially those in-order ones) tend to be much more friendly to branching (exactly because they're not out-of-order). NB: I am not arguing whether unique_ptr<> should check or not: if I want checked version, I will write my own wrapper, it is not a rocket science.
(That'll only work for null.)