On Thursday, 6 April 2023 at 01:44:15 UTC, H. S. Teoh wrote:


D ranges are conceptually sequential, but the actual underlying memory access patterns depends on the concrete type at runtime. An array's elements are stored sequentially in memory, and arrays are ranges. But a linked-list can also have a range interface, yet its elements may be stored in non-consecutive memory locations. So the concrete type matters here; the range API only gives you conceptual sequentiality, it does not guarantee physically sequential memory access.

Very helpful Teoh.  Thanks again.

Reply via email to