Optimize and inline premultiplication