I hope I'm not overstepping any boundaries, but I would really appreciate some help in optimizing these functions I wrote. I'm just looking for some general pointers.
Code:
int sum(int arr[], int start, int length) {
	int re=0;
	for (int i=start; i<length; i++) re+=arr[i];
	return re;
}

void divArr(int org[], int db, int length) {
	for (int i=0; i<length; i++) org[i]/=db;
}

void zeros(int arr[], int length) {
	for (int i=0; i<length; i++) arr[i]=0;
}

int round(float r) {
	return (int)floor(r+0.5);
}

void fastsmooth(int Y[], int smoothwidth, int length) {
	int w=smoothwidth;
	int SumPoints=sum(Y, 0, w);
	int* s=new int[length];
	zeros(s, length);
	int halfw=round((float)w/2);
	for (int k=0; k<length-w; k++) {
		s[k+halfw-1]=SumPoints;
		SumPoints-=Y[k];
		SumPoints+=Y[k+w];
	}
	divArr(s, w, length);
	SumPoints=sum(s, 0, w);
	zeros(Y, length);
	for (int k=0; k<length-w; k++) {
		Y[k+halfw-1]=SumPoints;
		SumPoints-=s[k];
		SumPoints+=s[k+w];
	}
	divArr(Y, w, length);
	delete [] s;
}

void deriv(int Y[], int length) {
	int* d=new int[length];
	d[0]=Y[1]-Y[0];
	d[length-1]=Y[length-1]-Y[length-2];
	for (int j=1; j<length-1; j++) {
		d[j]=(Y[j+1]-Y[j-1])/2;
	}
	memcpy((void*)Y, (void*)d, length*sizeof(float));
	delete [] d;
}
These functions are called for quite large sets of data, with 10,000,000 being a reasonable average length (I'm dealing with PCM data), and several (five, generally) such arrays being handled at once.

This code is also applied to similar data, and I'm aware that there may not be too many options for it, but again, I'd appreciate any general direction.
Code:
float Butterworth::Run(float input) {
	float output=input*gain;
	float new_hist;

	output-=history1*coef0;
	new_hist=output-history2*coef1;

	output=new_hist+history1*2.f;
	output+=history2;

	history2=history1;
	history1=new_hist;

	output-=history3*coef2;
	new_hist=output-history4*coef3;

	output=new_hist+history3*2.f;
	output+=history4;

	history4=history3;
	history3=new_hist;

	return output;
}
I realize that this is a lot, so thank you in advance if you take the time to give me any tips!