make this javascript function more efficient:
function millisecondsToHMS(inputMilliseconds) {
  // Calculate the hours, minutes, and seconds.
  const hours = Math.floor(inputMilliseconds / (60 * 60 * 1000));
  const minutes = Math.floor((inputMilliseconds % (60 * 60 * 1000)) / (60 * 1000));
  const seconds = Math.floor((inputMilliseconds % (60 * 1000)) / 1000);
  const milliseconds = inputMilliseconds % 1000;

  // Format the time.
  const formattedTime = `${hours}:${minutes}:${seconds}.${milliseconds}`;

  return formattedTime;
} Your answer should have exactly 6 paragraphs. Make sure that the first paragraph starts with the word "overall" and that each paragraph is separated by two new lines.
user