Lapack is indeed used for a performance gain. OpenCV has an internal HAL file that's composed entirely of Lapack-optimized functions.