FIR Filter implementation without padding Is it possible to implement FIR filtering action without padding the input and coefficients?

i.e. Let's say if the input and filter coefficients are of size 4, then the output will be 7 samples. So, while implementing, we generally add 3 more zeros to both input and filter coefficients making them equal to output size. 

But, if the input and filter coefficients are of size 1024, then the output will be of 2047 samples. So, now, we need to add 1023 zeros to both input and filter coefficients. This is inefficient, right?

So, I just want to know is there any other way to implement FIR Filtering without padding?

The below code gives the idea I was talking about.

int main()
{
   int x[4],h[4],y[7]={0};

   int i,j;

   for(i=0;i&lt;4;i++)
   {
        x[i] = i+1;
        h[i] = i+1;
   }

   for(int i=0;i&lt;7;i++)
   {
      for(int j=0;j&lt;4;j++)
      {
         y[i+j] = y[i+j]+x[i]*h[j]; //filtered signal of length M+N-1
      }
   }

   for(i=0;i&lt;7;i++)
     printf("%d\n", y[i]);


}


Output: 1,4,10,20,25,24,16 - expected

But obtained results - 1,4,10,20,garbage value, garbage value, garbage value
As I said in a comment, no padding is necessary. A simple FIR implementation might look like (it is assumed that the filter kernel h[] has already been implemented)

float y[N+M-1];
//set y[] to zero
for(int i=0;i&lt;N;i++){ //N - signal length

 for(int j=0;j&lt;M;j++){ //M - filter kernel length (usually much shorter than N 

   y[i+j] = y[i+j]+x[i]*h[j]; //filtered signal of length M+N-1
   }
}


h[] represents the filter kernel and is usually implemented as a window-sync filter of length M (in your case it's just the original signal). 

For your use case, you'd have

int x[7],h[7],y[13]={0};


       int i,j;

       for(i=0;i&lt;7;i++)
       {
         if(i&lt;4)
         {
            x[i] = i+1;
            h[i] = i+1;
         }
         if(i&gt;=4)
         {
            x[i] = 0;
            h[i] = 0;
         }
       }


       for(int i=0;i&lt;7;i++)
       {
          for(int j=0;j&lt;7;j++)
          {
             y[i+j] = y[i+j]+x[i]*h[j]; //filtered signal of length M+N-1
          }
       }


Note that since you're convolving a signal with itself (x*h), you don't even need h[] but I kept it for clarity.