← Back to index
|
Original Bugzilla link
Bug 19310 – VRP for array casts
Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-10-18T09:47:47Z
Last change time
2024-12-13T19:00:58Z
Keywords
performance
Assigned to
No Owner
Creator
anonymous4
Moved to GitHub: dmd#19497 →
Comments
Comment #0
by dfj1esp02 — 2018-10-18T09:47:47Z
long[] f(byte[] a) { return cast(long[])a[0..a.length/8*8]; } Here the compiler can see that the array length is multiple of 8 and simply divide the length by 8 for the cast.
Comment #1
by robert.schadek — 2024-12-13T19:00:58Z
THIS ISSUE HAS BEEN MOVED TO GITHUB
https://github.com/dlang/dmd/issues/19497
DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB