Is it cheaper to switch material instances or set material parameters?

Exactly what the title says, which one is less intensive on the processor?