First involves only one operation: Initialization,
While second involves two operations: Initialization + Assignment.
For an intrinsic data type like double
the overhead is negligible but for user defined data types second is detrimental to performance(How much? Profiling should tell that).
So in general it is better practice to use First because:
- It is guaranteed to be atleast as fast if not faster than Second
- It is more readable.