[all-commits] [llvm/llvm-project] a9407d: [libc++] Port #200996 to ostream (#226372)

Nico Weber via All-commits all-commits at lists.llvm.org
Sun Sep 27 07:41:50 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a9407d59c4abfb8bf49da7dfcec6775707288b9e
      https://github.com/llvm/llvm-project/commit/a9407d59c4abfb8bf49da7dfcec6775707288b9e
  Author: Nico Weber <thakis at chromium.org>
  Date:   2026-09-27 (Sun, 27 Sep 2026)

  Changed paths:
    M libcxx/include/__ostream/print.h

  Log Message:
  -----------
  [libc++] Port #200996 to ostream (#226372)

Reduces the time to compile a TU with just `#include <ostream>` from
254.7 ms ± 3.0 ms to 227.7 ms ± 2.1 ms on my system (-std=c++23, -O2,
arm64 macOS).

See #195466 for details. Without this, the call is evaluated when the
template is parsed, which evaluates format_string's consteval
constructor for "\n" in every translation unit that includes <ostream>,
even if nothing calls println().

No behavior change.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list