bors
3dd7c49faf
auto merge of #11251 : pcwalton/rust/remove-at-mut, r=pcwalton
...
r? @nikomatsakis
for the borrow checker changes. Write guards are now eliminated.
2014-01-03 22:36:53 -08:00
Patrick Walton
8092153634
libsyntax: Fix tests.
2014-01-03 22:22:40 -08:00
bors
0ff6c12ce9
auto merge of #11280 : c-a/rust/inline_byteswap, r=brson
...
After writing some benchmarks for ebml::reader::vuint_at() I noticed that LLVM doesn't seem to inline the from_be32 function even though it only does a call to the bswap32 intrinsic in the x86_64 case. Marking the functions with #[inline(always)] fixes that and seems to me a reasonable thing to do. I got the following measurements in my vuint_at() benchmarks:
- Before
test ebml::bench::vuint_at_A_aligned ... bench: 1075 ns/iter (+/- 58)
test ebml::bench::vuint_at_A_unaligned ... bench: 1073 ns/iter (+/- 5)
test ebml::bench::vuint_at_D_aligned ... bench: 1150 ns/iter (+/- 5)
test ebml::bench::vuint_at_D_unaligned ... bench: 1151 ns/iter (+/- 6)
- Inline from_be32
test ebml::bench::vuint_at_A_aligned ... bench: 769 ns/iter (+/- 9)
test ebml::bench::vuint_at_A_unaligned ... bench: 795 ns/iter (+/- 6)
test ebml::bench::vuint_at_D_aligned ... bench: 758 ns/iter (+/- 8)
test ebml::bench::vuint_at_D_unaligned ... bench: 759 ns/iter (+/- 8)
- Using vuint_at_slow()
test ebml::bench::vuint_at_A_aligned ... bench: 646 ns/iter (+/- 7)
test ebml::bench::vuint_at_A_unaligned ... bench: 645 ns/iter (+/- 3)
test ebml::bench::vuint_at_D_aligned ... bench: 907 ns/iter (+/- 4)
test ebml::bench::vuint_at_D_unaligned ... bench: 1085 ns/iter (+/- 16)
As expected inlining from_be32() gave a considerable speedup.
I also tried how the "slow" version fared against the optimized version and noticed that it's
actually a bit faster for small A class integers (using only two bytes) but slower for big D class integers (using four bytes)
2014-01-03 21:21:50 -08:00
bors
8bfd2a84cf
auto merge of #11277 : brson/rust/more0.9, r=alexcrichton
2014-01-03 17:16:50 -08:00
Patrick Walton
02c1d2ff52
test: Make all the run-pass tests use pub fn main
2014-01-03 15:30:54 -08:00
Patrick Walton
82a09b9a04
librustc: Remove @mut
support from the parser
2014-01-03 14:02:01 -08:00
Patrick Walton
88281290ff
librustc: Remove @mut
support from the typechecker and borrow checker
2014-01-03 14:02:01 -08:00
Patrick Walton
9b35ae75d2
doc: Remove all mentions of @mut
from the documentation.
2014-01-03 14:02:01 -08:00
Patrick Walton
c3694d732e
test: De-@mut
the test suite
2014-01-03 14:02:01 -08:00
Patrick Walton
df13c64c3b
test: Get rid of some @mut
s in borrow check tests
2014-01-03 14:02:01 -08:00
Patrick Walton
65d55afd2f
test: Make borrowck-assign-to-subfield
into a run-pass test, now that
...
it no longer has boxes in it
2014-01-03 14:02:01 -08:00
Patrick Walton
179c054631
test: Remove all borrow check write guard tests
2014-01-03 14:02:01 -08:00
Patrick Walton
b6e516859a
libstd: Remove all support code related to @mut
2014-01-03 14:02:00 -08:00
Patrick Walton
e095889e4e
libstd: De-@mut
the heap_cycles
test
2014-01-03 14:02:00 -08:00
Patrick Walton
aa93e6e664
libextra: Remove MutList
, as it's inexorably tied to @mut
2014-01-03 14:02:00 -08:00
Patrick Walton
84e977c355
libstd: Remove a spurious @mut
from a disabled test
2014-01-03 14:02:00 -08:00
Patrick Walton
07bbc4133d
libextra: Remove unnecessary @mut
s
2014-01-03 14:02:00 -08:00
Patrick Walton
c1d6f5ed51
libextra: De-@mut
the arena
2014-01-03 14:02:00 -08:00
Patrick Walton
c38456a92f
librustdoc: De-@mut
librustdoc
2014-01-03 14:02:00 -08:00
Patrick Walton
af0439b1e3
librustpkg: De-@mut
rustpkg
2014-01-03 14:02:00 -08:00
Patrick Walton
901df8a63b
libsyntax: Remove unused MultiRenamer
2014-01-03 14:02:00 -08:00
Patrick Walton
1d29163e9c
librustc: Eliminate an unnecessary @mut
in pretty printing.
...
This removes all `@mut` from `librustc` and `libsyntax`.
2014-01-03 14:02:00 -08:00
Patrick Walton
6043957d8d
libsyntax: De-@mut
ps::boxes
2014-01-03 14:02:00 -08:00
Patrick Walton
5eafcc4f93
libsyntax: De-@mut
(and de-@
) Printer::print_stack
2014-01-03 14:02:00 -08:00
Patrick Walton
982cb824ce
libsyntax: De-@mut
Interner::vect
2014-01-03 14:01:59 -08:00
Patrick Walton
4c85cf7a40
libsyntax: De-@mut
CodeMap::files
2014-01-03 14:01:59 -08:00
Patrick Walton
39f39ed40b
libsyntax: De-@mut
FileMap::multibyte_chars
2014-01-03 14:01:59 -08:00
Patrick Walton
27cc3d203b
libsyntax: De-@mut
FileMap::lines
2014-01-03 14:01:59 -08:00
Patrick Walton
ada9150abf
libsyntax: Correctly de-@mut
the pretty printer writer
2014-01-03 14:01:59 -08:00
Patrick Walton
39f0270544
libsyntax: Remove an unnecessary @mut io::Reader
2014-01-03 14:01:59 -08:00
Patrick Walton
1dbeb5b2ac
libsyntax: De-@mut
SCTable
2014-01-03 14:01:59 -08:00
Patrick Walton
b476d979d2
libsyntax: De-@mut
SCTable::rename_memo
2014-01-03 14:01:59 -08:00
Patrick Walton
4d6dde7f49
libsyntax: De-@mut
SCTable::mark_memo
2014-01-03 14:01:59 -08:00
Patrick Walton
be17a1b08c
libsyntax: De-@mut
SCTable::table
2014-01-03 14:01:59 -08:00
Patrick Walton
96f807def6
libsyntax: De-@mut
the interner map
2014-01-03 14:01:59 -08:00
Patrick Walton
9d6f8cdefa
libsyntax: De-@mut
(and de-@
) the AST mapping context
2014-01-03 14:01:59 -08:00
Patrick Walton
acdc998737
libsyntax: De-@mut
the path in the AST mapping context
2014-01-03 14:01:58 -08:00
Patrick Walton
4269f85d5b
libsyntax: De-@mut
name_idx
2014-01-03 14:01:58 -08:00
Patrick Walton
449ebeea08
librustc: De-@mut
the AST map
2014-01-03 14:01:58 -08:00
Patrick Walton
12ad1b0662
libsyntax: De-@mut
CurrentCommentAndLiteral
2014-01-03 14:01:58 -08:00
Patrick Walton
522a68d5bc
libsyntax: De-@mut
the resolve table
2014-01-03 14:01:58 -08:00
Patrick Walton
8ed6f3e78f
libsyntax: De-@mut
the handler
2014-01-03 14:01:58 -08:00
Patrick Walton
a2b7367a88
libsyntax: De-@mut
HandlerT::err_count
2014-01-03 14:01:58 -08:00
Patrick Walton
d347d5a762
libsyntax: De-@mut
TtFrame
2014-01-03 14:01:58 -08:00
Patrick Walton
a7f7482e79
libsyntax: De-@mut
TtFrame::idx
2014-01-03 14:01:58 -08:00
Patrick Walton
497b63ddf0
librustc: De-@mut
all writers
2014-01-03 14:01:58 -08:00
Patrick Walton
b26018cc89
librustc: De-@mut
(and de-@
) the pretty printer
2014-01-03 14:01:58 -08:00
Patrick Walton
4d66af2698
librustc: De-@mut
the span handler
2014-01-03 14:01:57 -08:00
Patrick Walton
7e1b535eb1
libsyntax: De-@mut
StringReader
, TtReader
, and reader
2014-01-03 14:01:57 -08:00
Patrick Walton
2b83377b29
libsyntax: De-@mut
TtReader::stack
2014-01-03 14:01:57 -08:00