On Tuesday, 23 June 2015 at 11:22:31 UTC, Steven Schveighoffer
wrote:
On 6/23/15 1:51 AM, jkpl wrote:
On Tuesday, 23 June 2015 at 05:16:23 UTC, Assembly wrote:
[...]
* Option 1/
if most of the time you have to insert at the beginning, then
start
reading from the end and append to the end,
On 6/23/15 8:12 AM, Baz wrote:
On Tuesday, 23 June 2015 at 11:22:31 UTC, Steven Schveighoffer wrote:
On 6/23/15 1:51 AM, jkpl wrote:
On Tuesday, 23 June 2015 at 05:16:23 UTC, Assembly wrote:
[...]
* Option 1/
if most of the time you have to insert at the beginning, then start
reading from
On Tuesday, 23 June 2015 at 13:29:41 UTC, Steven Schveighoffer
wrote:
On 6/23/15 8:12 AM, Baz wrote:
On Tuesday, 23 June 2015 at 11:22:31 UTC, Steven Schveighoffer
wrote:
[...]
according to the C library, memmove handle overlapps, you
mismatch with
memcpy which does not.
The above is
On 6/23/15 10:20 AM, Baz wrote:
On Tuesday, 23 June 2015 at 13:29:41 UTC, Steven Schveighoffer wrote:
On 6/23/15 8:12 AM, Baz wrote:
On Tuesday, 23 June 2015 at 11:22:31 UTC, Steven Schveighoffer wrote:
[...]
according to the C library, memmove handle overlapps, you mismatch with
memcpy
On 06/22/2015 10:16 PM, Assembly wrote: What's a fast way to insert an
element at index 0 of array? now that the
code is working I want to clean this:
void push(T val)
{
T[] t = new T[buffer.length + 1];
t[0] = val;
t[1 .. $] = buffer;
buffer = t;
On 6/23/15 1:51 AM, jkpl wrote:
On Tuesday, 23 June 2015 at 05:16:23 UTC, Assembly wrote:
What's a fast way to insert an element at index 0 of array? now that
the code is working I want to clean this:
void push(T val)
{
T[] t = new T[buffer.length + 1];
t[0] = val;
What's a fast way to insert an element at index 0 of array? now
that the code is working I want to clean this:
void push(T val)
{
T[] t = new T[buffer.length + 1];
t[0] = val;
t[1 .. $] = buffer;
buffer = t;
}
I
On Tuesday, 23 June 2015 at 05:16:23 UTC, Assembly wrote:
What's a fast way to insert an element at index 0 of array? now
that the code is working I want to clean this:
void push(T val)
{
T[] t = new T[buffer.length + 1];
t[0] = val;
t[1
On Tuesday, 23 June 2015 at 05:16:23 UTC, Assembly wrote:
What's a fast way to insert an element at index 0 of array? now
that the code is working I want to clean this:
void push(T val)
{
T[] t = new T[buffer.length + 1];
t[0] = val;
t[1