Setting array length without initializing/reallocating.

Paul Backus snarwin at gmail.com
Tue Dec 15 01:28:23 UTC 2020


On Monday, 14 December 2020 at 23:55:09 UTC, Steven Schveighoffer 
wrote:
> Yes, you can use .ptr to avoid bounds checks, and it's safe if 
> you do it correctly.

Though doing it correctly may be harder than you'd think:

https://gist.github.com/pbackus/39b13e8a2c6aea0e090e4b1fe8046df5#example-short-string


More information about the Digitalmars-d mailing list