How to allow Float64 or ForwardDiff.dual in structs and arrays

Hello,

I have a module that usually operates on Float64 types, but I also sometimes want to allow dual numbers for some initial optimization. How can I achieve that?

For example:

Now:

const SimFloat = Float64
const Vec3     = MVector{3, SimFloat} 

Better:

Dual1=ForwardDiff.Dual
const SimFloat =  Union{Dual1, Float64}
const Vec3     = MVector{3, SimFloat}

What is the impact on the performance if I use a Union in structs and MVectors?