fast c product implementation