Several performance improvements, mainly in loading and instancing scenes and resources.

A general speedup should be apparent, with even more peformance increase when compiling optimized.

WARNING: Tested and it seems to work, but if something breaks, please report.
This commit is contained in:
Juan Linietsky 2015-06-29 00:29:49 -03:00
parent 2b64f73b04
commit 95047562d7
62 changed files with 475 additions and 294 deletions

View file

@ -340,12 +340,14 @@ template<class T>
void Vector<T>::remove(int p_index) {
ERR_FAIL_INDEX(p_index, size());
for (int i=p_index; i<size()-1; i++) {
T*p=ptr();
int len=size();
for (int i=p_index; i<len-1; i++) {
set(i, get(i+1));
p[i]=p[i+1];
};
resize(size()-1);
resize(len-1);
};
template<class T>