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

deadalnix deadalnix at gmail.com
Sat Nov 6 01:55:47 UTC 2021


On Saturday, 6 November 2021 at 00:40:41 UTC, Andrei Alexandrescu 
wrote:
> Turns out the EH code is very well separated. Gcc goes so far 
> as to generate two separate functions, one for hot and one for 
> cold. Clang also does a good job separating the paths.
>

You bet, I wrote the code that separates the two :)

> It happens in our metier that good judgment becomes prejudice. 
> It seems that's what happening with "exceptions are expensive" 
> right now.

It is on windows due to the whole funclet business, and it is in 
some specific condition (for instance if icache pressure is the 
bottleneck) but in most cases, the impact is fairly minimal 
beyond binary size.


More information about the Digitalmars-d mailing list