Landing: 33ac889aa27d

Project / Subsystem

gcc / libstdc++

Date

2026-05-25

Author

Tomasz Kamiński

Commit

33ac889aa27d9917e6e7d07c282015b7c48e0440

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
libstdc++
patch_id
commit_hash
33ac889aa27d9917e6e7d07c282015b7c48e0440
source_type
github
headline
libstdc++: Optimize stream output for piecewise distributions.
tldr
The `operator<<` for piecewise distributions avoids creating a temporary vector, improving performance.
author
Tomasz Kamiński
outcome
committed
performance_win
true
breaking_change
false
series_id
series_parts
[]
tags
  • libstdc++
  • random
  • optimization
  • iostreams
discussion_id_link
bugzilla_pr
date
2026-05-25T00:00:00.000Z

The operator<< for piecewise_constant_distribution and piecewise_linear_distribution now directly accesses the internal _M_int and _M_den members of the _M_param structure, avoiding the creation of a temporary vector. This improves the performance of streaming these distributions, particularly when they contain a large number of intervals.