fix docs
reduce exception checking overhead