<p>Which is faster?  someCondition has the same probability of being true as it has of being false.</p>

<p>Insertion:</p>

<pre><code>arrayList = Array("apple", "pear","grape")
if someCondition then
    ' insert "banana" element
end if
</code></pre>

<p>Deletion:</p>

<pre><code>arrayList = Array("apple","banana","pear","grape")
if not someCondition then
    ' remove "banana" element
end if
</code></pre>

<p>It looks like it depends purely on the implementation of Insert and Remove.  So which, in general, is faster?  I'm leaning toward insertion because I've read that one can use CopyMemory to insert without looping.  Is this the same for deletion?  Does anyone have an example?</p>

<p>Edit:
This is VB6, not VB.NET.
For display reasons, I have to use insert rather than append.</p>

I've found an example showing that one can delete without looping as well.  It looks simpler than the code to insert.
```
```
Public Sub RemoveArrayElement_Str(AryVar() As String, ByVal _
    RemoveWhich As Long)
    '// The size of the array elements
    '// In the case of string arrays, they are
    '// simply 32 bit pointers to BSTR's.
    Dim byteLen As Byte

    '// String pointers are 4 bytes
    byteLen = 4

    '// The copymemory operation is not necessary unless
    '// we are working with an array element that is not
    '// at the end of the array
    If RemoveWhich < UBound(AryVar) Then
        '// Copy the block of string pointers starting at
        ' the position after the
        '// removed item back one spot.
        CopyMemory ByVal VarPtr(AryVar(RemoveWhich)), ByVal _
            VarPtr(AryVar(RemoveWhich + 1)), (byteLen) * _
            (UBound(AryVar) - RemoveWhich)
    End If

    '// If we are removing the last array element
    '// just deinitialize the array
    '// otherwise chop the array down by one.
    If UBound(AryVar) = LBound(AryVar) Then
        Erase AryVar
    Else
        ReDim Preserve AryVar(UBound(AryVar) - 1)
    End If
End Sub
```
```
http://www.vb-helper.com/howto_delete_from_array.html