e27b88d5bd
Not all users of MemWriter need to seek, but having MemWriter seekable adds between 3-29% in overhead in certain circumstances. This fixes that performance gap by making a non-seekable MemWriter, and creating a new SeekableMemWriter for those circumstances when that functionality is actually needed. ``` test io::mem::test::bench_buf_reader ... bench: 682 ns/iter (+/- 85) test io::mem::test::bench_buf_writer ... bench: 580 ns/iter (+/- 57) test io::mem::test::bench_mem_reader ... bench: 793 ns/iter (+/- 99) test io::mem::test::bench_mem_writer_001_0000 ... bench: 48 ns/iter (+/- 27) test io::mem::test::bench_mem_writer_001_0010 ... bench: 65 ns/iter (+/- 27) = 153 MB/s test io::mem::test::bench_mem_writer_001_0100 ... bench: 132 ns/iter (+/- 12) = 757 MB/s test io::mem::test::bench_mem_writer_001_1000 ... bench: 802 ns/iter (+/- 151) = 1246 MB/s test io::mem::test::bench_mem_writer_100_0000 ... bench: 481 ns/iter (+/- 28) test io::mem::test::bench_mem_writer_100_0010 ... bench: 1957 ns/iter (+/- 126) = 510 MB/s test io::mem::test::bench_mem_writer_100_0100 ... bench: 8222 ns/iter (+/- 434) = 1216 MB/s test io::mem::test::bench_mem_writer_100_1000 ... bench: 82496 ns/iter (+/- 11191) = 1212 MB/s test io::mem::test::bench_seekable_mem_writer_001_0000 ... bench: 48 ns/iter (+/- 2) test io::mem::test::bench_seekable_mem_writer_001_0010 ... bench: 64 ns/iter (+/- 2) = 156 MB/s test io::mem::test::bench_seekable_mem_writer_001_0100 ... bench: 129 ns/iter (+/- 7) = 775 MB/s test io::mem::test::bench_seekable_mem_writer_001_1000 ... bench: 801 ns/iter (+/- 159) = 1248 MB/s test io::mem::test::bench_seekable_mem_writer_100_0000 ... bench: 711 ns/iter (+/- 51) test io::mem::test::bench_seekable_mem_writer_100_0010 ... bench: 2532 ns/iter (+/- 227) = 394 MB/s test io::mem::test::bench_seekable_mem_writer_100_0100 ... bench: 8962 ns/iter (+/- 947) = 1115 MB/s test io::mem::test::bench_seekable_mem_writer_100_1000 ... bench: 85086 ns/iter (+/- 11555) = 1175 MB/s ``` [breaking-change] |
||
---|---|---|
.. | ||
compiler-rt@62a4ca6055 | ||
compiletest | ||
doc | ||
driver | ||
etc | ||
grammar | ||
gyp@1e46da1000 | ||
jemalloc@024c67ad65 | ||
liballoc | ||
libarena | ||
libbacktrace | ||
libcollections | ||
libcore | ||
libcoretest | ||
libdebug | ||
libflate | ||
libfmt_macros | ||
libfourcc | ||
libgetopts | ||
libglob | ||
libgraphviz | ||
libgreen | ||
libhexfloat | ||
liblibc | ||
liblog | ||
libnative | ||
libnum | ||
librand | ||
libregex | ||
libregex_macros | ||
librlibc | ||
librustc | ||
librustc_back | ||
librustc_llvm | ||
librustdoc | ||
librustrt | ||
librustuv | ||
libsemver | ||
libserialize | ||
libstd | ||
libsync | ||
libsyntax | ||
libterm | ||
libtest | ||
libtime | ||
libunicode | ||
liburl | ||
libuuid | ||
libuv@43495892de | ||
llvm@cd24b5c663 | ||
rt | ||
rustllvm | ||
test | ||
README.md | ||
snapshots.txt |
This is a preliminary version of the Rust compiler, libraries and tools.
Source layout:
Path | Description |
---|---|
librustc/ |
The self-hosted compiler |
liballoc/ |
Rust's core allocation library |
libcore/ |
The Rust core library |
libdebug/ |
Debugging utilities |
libstd/ |
The standard library (imported and linked by default) |
libgreen/ |
The M:N runtime library |
libnative/ |
The 1:1 runtime library |
libsyntax/ |
The Rust parser and pretty-printer |
libtest/ |
Rust's test-runner code |
------------------- | --------------------------------------------------------- |
libarena/ |
The arena (a fast but limited) memory allocator |
libbacktrace/ |
The libbacktrace library |
libcollections/ |
A collection of useful data structures and containers |
libflate/ |
Simple compression library |
libfmt_macros/ |
Macro support for format strings |
libfourcc/ |
Data format identifier library |
libgetopts/ |
Get command-line-options library |
libglob/ |
Unix glob patterns library |
libgraphviz/ |
Generating files for Graphviz |
libhexfloat/ |
Hexadecimal floating-point literals |
liblibc/ |
Bindings for the C standard library |
liblog/ |
Utilities for program-wide and customizable logging |
libnum/ |
Extended number support library (complex, rational, etc) |
librand/ |
Random numbers and distributions |
libregex/ |
Regular expressions |
libregex_macros/ |
The regex! syntax extension |
libsemver/ |
Rust's semantic versioning library |
libserialize/ |
Encode-Decode types library |
libsync/ |
Concurrency mechanisms and primitives |
libterm/ |
ANSI color library for terminals |
libtime/ |
Time operations library |
liburl/ |
URL handling lirary |
libuuid/ |
UUID's handling code |
------------------- | --------------------------------------------------------- |
rt/ |
The runtime system |
rt/rust_*.c |
- Some of the runtime services |
rt/vg |
- Valgrind headers |
rt/msvc |
- MSVC support |
rt/sundown |
- The Markdown library used by rustdoc |
------------------- | --------------------------------------------------------- |
compiletest/ |
The test runner |
test/ |
Testsuite |
test/codegen |
- Tests for the LLVM IR infrastructure |
test/compile-fail |
- Tests that should fail to compile |
test/debug-info |
- Tests for the debuginfo tool |
test/run-fail |
- Tests that should compile, run and fail |
test/run-make |
- Tests that depend on a Makefile infrastructure |
test/run-pass |
- Tests that should compile, run and succeed |
test/bench |
- Benchmarks and miscellaneous |
test/pretty |
- Pretty-printer tests |
test/auxiliary |
- Dependencies of tests |
------------------- | --------------------------------------------------------- |
librustdoc/ |
The Rust API documentation tool |
libuv/ |
The libuv submodule |
librustuv/ |
Rust libuv support code |
------------------- | --------------------------------------------------------- |
llvm/ |
The LLVM submodule |
rustllvm/ |
LLVM support code |
------------------- | --------------------------------------------------------- |
etc/ |
Scripts, editors support, misc |
NOTE: This list (especially the second part of the table which contains modules and libraries) is highly volatile and subject to change.