Regarding performance of double vs long double:
double
long double
On Macbook, Core i7 2017, MacOs 11, Xcode 12.2, C++17, Clang, with and without optimization