Is it possible to optimize the calculation of $ax+b$ once I know $a$ and $b$? An "algorithm" for calculating $ax+b$ would take the steps


Calculate $a$ times $x$
Calculate $b$ plus the result of previous line.


But if the values of $a$ and $b$ are known, can we create a more efficient algorithm for the task?

Of course, when $a = 1$, I can optimize the previous algorithm by simply skipping the first step, and when $b = 0$, an optimization would be to skip step 2. But is there always an optimization that I can do?

More formally

Let $originalAlgorithm$ be the two-step algorithm above. What I want is a meta-algorithm, $M$ that 
$$
M(a,b) = optimizedAlgorithm
$$
and, of course,
$$
optimizedAlgorithm(x) = originalAlgorithm(x) = ax+b
$$
but $optimizedAlgorithm$ is more time-efficient than $originalAlgorithm$.
I would rephrase the question as follows: 


  Consider the function $F$ and the family of functions $F_{a,b}$ defined as 
  $$F_{a,b}(x) = F(a,b,x) =ax+b.$$
  Can we compute $F_{a,b}$ faster than the complexity of $F$?
  If yes, given $a$ and $b$, can we algorithmically find such an algorithm?


As babou wrote I think the answer depends on your computation model. 
Let me explain one case:
Consider polynomial size circuits with unbounded fan-in AND, OR, and NOT gates. 
Time is defined as the depth of the circuit.

$F$ is complete for $\mathsf{TC}^0$, so it requires super-constant depth, the best known upper-bound requires roughly depth $\lg n/\lg \lg n$.

If we fix $a,b$ then $F_{a,b}$ is in $\mathsf{AC^0}$ and therefore can be computed by a constant depth circuit. 
But the depth is constant only in $n$, not in $a,b$.
Can we obtain a dependence of depth on $a$ and $b$ which is better than the more uniform case? The answer is no.

Another model is algebraic circuits with binary plus and times gates and constants. 
$F$ can be computed in depth $2$.
It is easy to see that $F_{a,b}$ cannot be computed in depth $1$.

Now assume a modified algebraic model where we have unbounded fan-in gates.
Now $F_{a,b}$ can be computed in depth $1$ by applying addition on $a$ copies of $x$ and one copy of $b$ in one step. $F$ still requires depth $2$.