Given an array of `len` elements of type `signed short` it is to find a position of the Most Significant Bit set in the maximal absolute value element in the array. For example, if array L contains `{-134, 123, 0, -890}` then `f(L)` should return `floor(log2(abs(-890)))+1`.

Here is my current function:

```
short MSBSetMaxMagnitude(const short *p, int len)
{
   unsigned int t = 0;

   while (len > 0)
   {
      t |= abs(*p);
      p++;
      len--;
   }
   if(t)
      return (short)(32 - __builtin_clz(t));
   else
      return 0;
}

```

However, it is a bit slow because of the abs() function requiring branching. I've tried to use an abs() without branching instead but it is even slower because it contains at least 3 arithmetical instructions. So I hope that maybe there is an efficient algorithm to find exactly what I need.