bounds checking and optimization

Bruce Carneal bcarneal at gmail.com
Thu Jul 1 01:59:25 UTC 2021


On Wednesday, 30 June 2021 at 15:51:58 UTC, Bruce Carneal wrote:
> ...
>
>     const __bound = min(a.length, b.length, c.length);
>     const __throwAtEnd = a.length < __bound || b.length < 
> __bound;

The compiler emitted throw flag in the pseudo-code should be:

     const __throwAtEnd = a.length < c.length || b.length < 
c.length;

Sorry bout the noise.  I appreciate the later contributors having 
read through it to the intent.

Glad to hear that there may be some paths open to faster @safe 
code in the future.



More information about the digitalmars-d-ldc mailing list