Slow update function I've been fiddling with Unity, trying to make nice walking/running animations. So, i found the Stealth tutorial and I used pretty much the same animator as the AI, only I only use Speed and AngularSpeed and, of course, added a control script. The controls work as intended but the whole script is laggy. I know, my Update function is really loaded, but I'm out of ideas. Any input appreciated even if it is totally irrelevant :)

using UnityEngine;
using System.Collections;

public class Movement : MonoBehaviour {

    public float speed = 0f;        //used public just to check the values

    public float angularSpeed = 0f; //same

    public float accTime = 1f;      
    public float decTime = 1f;
    public float turnTime = 2.5f;

    public float speedOffset = 0f;      //offsets set to let lerp "go faster" when approaching the target value
    public float angularSpeedOffset = 0f;   //same

    private float axisX = 0f;
    private float axisY = 0f;

    private int speedHash = Animator.StringToHash ("Speed");
    private int angularSpeedHash = Animator.StringToHash ("AngularSpeed");

    private Animator anim;

    void Awake () {
        anim = GetComponent&lt;Animator&gt;();
    }

    void Update () {
        SpeedCalc ();
        AngularSpeedCalc ();

        anim.SetFloat (speedHash, speed);
        anim.SetFloat (angularSpeedHash, angularSpeed);
    }

    void SpeedCalc () {
        axisY = Input.GetAxis ("Vertical");

        if (axisY &gt; 0) 
            speed = Mathf.Lerp (speed, 5.7f * axisY + speedOffset, accTime * Time.deltaTime);       // targets multiplied by axis input for analogue sticks to be... analogue..
        else
            speed = Mathf.Lerp (speed, 0f - speedOffset * 0.5f , decTime * Time.deltaTime);

        if (speed &gt;= 5.7f) speed = 5.7f
        else if (speed &lt;= 0f) speed = 0f;
    }

    void AngularSpeedCalc () {
        axisX = Input.GetAxis ("Horizontal");

        if (axisX &gt; 0 &amp;&amp; angularSpeed &gt;= 0f)
            angularSpeed = Mathf.Lerp (angularSpeed, 2.5f * axisX + angularSpeedOffset, turnTime * Time.deltaTime);
        else if (axisX &lt; 0 &amp;&amp; angularSpeed &lt;= 0f)
            angularSpeed = Mathf.Lerp (angularSpeed, 2.5f * axisX - angularSpeedOffset, turnTime * Time.deltaTime);
        else {
            if (Mathf.Abs (angularSpeed) &gt; 0.2f)
                angularSpeed = Mathf.Lerp (angularSpeed, 0f, turnTime * Time.deltaTime);
            else
                angularSpeed = 0f;
        }

        if (angularSpeed &gt;= 2.5f) angularSpeed = 2.5f;
        else if (angularSpeed &lt;= -2.5f) angularSpeed = -2.5f;
    }
}
You have a lot of magic numbers in your code which should be extracted to meaningful named constants.   


if (Mathf.Abs (angularSpeed) &gt; 0.2f)
if (angularSpeed &gt;= 2.5f) angularSpeed = 2.5f;

  
  ...  




Using braces {} for single statements if or else parts shouldn't be omitted to make your code less error prone.  



Unneeded checks should be omitted too like  


if (angularSpeed &gt;= 2.5f) angularSpeed = 2.5f;
else if (angularSpeed &lt;= -2.5f) angularSpeed = -2.5f;  



should be  

if (angularSpeed &gt; 2.5f) 
{
    angularSpeed = 2.5f;
}
else if (angularSpeed &lt; -2.5f) 
{
    angularSpeed = -2.5f;
}  




Don't shorten your variable names because it reduces readability.  E.g


private Animator anim;  



should be 

private Animator animator;