Depends. If you want straight, easy higher-speed driving, go the Bf route. If you're traveling at night, might as well go this way. But if you have an opportunity for sight-seeing, driving during the day, go Yosemite. You will have to pay the $20 entrance fee though, unless you have a pass already.
Google Maps chooses the southern route, 453 miles, 7:13 hours.
Via Lee Vining, they give 375 miles, 7:10 hours.