Look into forward- vs reverse-mode automatic differentiation, and you'll understand what I'm referring to.