In the last episode (Jan 29), Mirar @ Pike developers forum said:
a = a[1..]; a += ({ some_value });
^^^^^^^^^^
*removing* elements isn't fast. Adding elements are.
But anyway, I wrote a benchmark for it. It uses v+=({17}) and v[x]=y respectively, up to 100000 elements (k times):
test total user mem (runs) Append array............... 0.808s 0.525s 3540kb (19) (952859/s) Append mapping............. 0.703s 0.459s 3784kb (22) (1090188/s) Append multiset............ 1.132s 0.806s 3684kb (14) (620018/s)
You're not really appending a mapping though; you're inserting a value. What's the benchmark time for doing v+=([ x:y ]) ? It's too bad there isn't an "append array element" syntax that doesn't require you to generate a 1-element array to append.