Which is faster? someCondition has the same probability of being true as it has of being false.
Insertion:
arrayList = Array("apple", "pear","grape")
if someCondition then
' insert "banana" element
end if
Deletion:
arrayList = Array("apple","banana","pear","grape")
if not someCondition then
' remove "banana" element
end if
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?
Edit: This is VB6, not VB.NET. For display reasons, I have to use insert rather than append.