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

Andrei Alexandrescu SeeWebsiteForEmail at erdani.com
Fri Nov 5 13:25:06 UTC 2021


On 2021-11-04 20:40, Walter Bright wrote:
> On 11/4/2021 12:51 AM, Elronnd wrote:
>> In the hot path it's the same speed.
> 
> C++ sold everyone the myth that exceptions not thrown are zero cost. 
> This has been thoroughly debunked, though the myth persists :-(

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.


More information about the Digitalmars-d mailing list