I would like to calculate a quadratic form: `x' Q y` in Julia.  

What would be the most efficient way to calculate this for the cases:

1. No assumption.
2. `Q` is symmetric.
3. `x` and `y` are the same (`x = y`).
4. Both `Q` is symmetric and `x = y`.

I know Julia has `dot()`. But I wonder if it is faster than BLAS call.