Improve array append performance.

Actually use the appropriate runtime function, instead of just
growing the array by one!
This commit is contained in:
Christian Kamm
2010-02-14 10:11:05 +01:00
parent e53b6a20f3
commit 9cd32549c4
5 changed files with 95 additions and 31 deletions

View File

@@ -24,7 +24,7 @@ DSliceValue* DtoNewDynArray(Loc& loc, Type* arrayType, DValue* dim, bool default
DSliceValue* DtoNewMulDimDynArray(Loc& loc, Type* arrayType, DValue** dims, size_t ndims, bool defaultInit=true);
DSliceValue* DtoResizeDynArray(Type* arrayType, DValue* array, DValue* newdim);
DSliceValue* DtoCatAssignElement(DValue* arr, Expression* exp);
void DtoCatAssignElement(Type* type, DValue* arr, Expression* exp);
DSliceValue* DtoCatAssignArray(DValue* arr, Expression* exp);
DSliceValue* DtoCatArrays(Type* type, Expression* e1, Expression* e2);
DSliceValue* DtoCatArrayElement(Type* type, Expression* exp1, Expression* exp2);