I would start with just cholesky(Hermitian(B)) \ X (you can use Symmetric instead of Hermitian, it makes no difference for real matrices). Using the Cholesky factorization will bestow the numerical and efficiency benefits you’re after.
Although if your matrix is singular (not strictly positive definite, or sufficiently close to singular that numerical issues arise) then cholesky will fail. In that situation, you will need to use pinv(B) * X or one of these iterative methods others have proposed.