about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2019-10-08 10:34:53 +1100
committerNicholas Nethercote <nnethercote@mozilla.com>2019-10-08 16:57:07 +1100
commit3832a634d3aa6a7c60448906e6656a22f7e35628 (patch)
tree2a58862ac85c57aba8067ccacd18a8a0935e2d5d /src/libstd/sys/unix/stack_overflow.rs
parent421bd77f42c2fe8a2596dbcc1580ec97fb89009f (diff)
downloadrust-3832a634d3aa6a7c60448906e6656a22f7e35628.tar.gz
rust-3832a634d3aa6a7c60448906e6656a22f7e35628.zip
Optimize `TokenStream::from_streams`.
Currently, this function creates a new empty stream, and then appends
the elements from each given stream onto that stream. This can cause
quadratic behaviour.

This commit changes the function so that it modifies the first stream
(which can be long) by extending it with the elements from the
subsequent streams (which are almost always short), which avoids the
quadratic behaviour.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions