Что быстрее:
short int SignFactor1(double x)
{
  if (std::signbit(x)) {
    return -1;
  } else {
    return 1;
}
short int SignFactor2(double x)
{
  if (x<0) {
    return -1;
  } else {
    return 1;
}
Или что-то третье?
Что быстрее:
short int SignFactor1(double x)
{
  if (std::signbit(x)) {
    return -1;
  } else {
    return 1;
}
short int SignFactor2(double x)
{
  if (x<0) {
    return -1;
  } else {
    return 1;
}
Или что-то третье?















