slightly faster conversion of logicals