dmd foreach loops throw exceptions on invalid UTF sequences, use replacementDchar instead

Walter Bright newshound2 at digitalmars.com
Fri Nov 5 20:41:34 UTC 2021


On 11/5/2021 6:25 AM, Andrei Alexandrescu wrote:
> I've been doing a fair amount of benchmarking for 
> https://amazon.com/Embracing-Modern-Safely-John-Lakos/dp/0137380356 and 
> surprisingly enough the myth holds true in most cases.

All the compilers I know of abandon many optimizations in the presence of unwind 
blocks.

For example, register allocation of variables is not done across unwind blocks. 
This is because the unwinder does not restore register contents.

A further problem is data flow analysis becomes largely ineffective because any 
operation that may throw (such as a function call to a throwing function) 
produces an edge from there to the catch block.


More information about the Digitalmars-d mailing list