summary refs log tree commit diff
path: root/src/test/bench
AgeCommit message (Collapse)AuthorLines
2014-01-07libextra: Introduce typed arenas.Patrick Walton-11/+12
A typed arena is a type of arena that can only allocate objects of one type. It is 3x faster than the existing arena and 13x faster than malloc on Mac.
2014-01-04Don't allow newtype structs to be dereferenced. #6246Brian Anderson-2/+3
2014-01-03test: De-`@mut` the test suitePatrick Walton-2/+2
2013-12-25Test fixes and rebase conflictsAlex Crichton-6/+5
* vec::raw::to_ptr is gone * Pausible => Pausable * Removing @ * Calling the main task "<main>" * Removing unused imports * Removing unused mut * Bringing some libextra tests up to date * Allowing compiletest to work at stage0 * Fixing the bootstrap-from-c rmake tests * assert => rtassert in a few cases * printing to stderr instead of stdout in fail!()
2013-12-22std::vec: make the sorting closure use `Ordering` rather than just beingHuon Wilson-24/+19
(implicitly) less_eq.
2013-12-21std::vec: add a sugary .sort() method for plain Ord sorting.Huon Wilson-3/+3
This moves the custom sorting to `.sort_by`.
2013-12-20extra: remove sort in favour of the std method.Huon Wilson-5/+5
Fixes #9676.
2013-12-16Test fallout from std::comm rewriteAlex Crichton-38/+40
2013-12-15librustc: Remove identifiers named `box`, since it's about to become a keyword.Patrick Walton-3/+3
2013-12-15std::vec: move pointless `raw::get` and `unsafe_get` functions.Huon Wilson-6/+6
This can easily be written as `(*v.unsafe_ref(i)).clone()`, or just `*v.unsafe_ref(i)` for primitive types like `i32` (the common case).
2013-12-15std::vec: remove unnecessary count parameter on {bytes,Huon Wilson-3/+2
raw}::copy_memory. Slices carry their length with them, so we can just use that information.
2013-12-14auto merge of #10933 : TeXitoi/rust/shootout-fasta-rewrite, r=alexcrichtonbors-112/+80
improvements: - no managed box - no virtual calls - no useless copy - optimizations (bisect is slower, limit tests, BufferedWriter...) - pass shootout test - 10 times faster
2013-12-12rewrite of shootout-fasta.rsGuillaume Pinot-112/+80
improvements: - no managed box - no virtual calls - no useless copy - optimizations (bisect is slower, limit tests, BufferedWriter...) - pass shootout test - should be as fast as the best official test Thanks to @cmr and @eddyb for their help!
2013-12-11Make 'self lifetime illegal.Erik Price-13/+13
Also remove all instances of 'self within the codebase. This fixes #10889.
2013-12-11std::io: Add Buffer.lines(), change .bytes() apiklutzy-15/+3
- `Buffer.lines()` returns `LineIterator` which yields line using `.read_line()`. - `Reader.bytes()` now takes `&mut self` instead of `self`. - `Reader.read_until()` swallows `EndOfFile`. This also affects `.read_line()`.
2013-12-10libstd: Remove `Cell` from the library.Patrick Walton-2/+4
2013-12-10librustpkg: Make `io::ignore_io_error()` use RAII; remove a few morePatrick Walton-2/+6
cells.
2013-12-10libextra: Another round of de-`Cell`-ing.Patrick Walton-36/+16
34 uses of `Cell` remain.
2013-12-04Revert "libstd: Change `Path::new` to `Path::init`."Kevin Ballard-3/+3
This reverts commit c54427ddfbbab41a39d14f2b1dc4f080cbc2d41b. Leave the #[ignores] in that were added to rustpkg tests. Conflicts: src/librustc/driver/driver.rs src/librustc/metadata/creader.rs
2013-12-04auto merge of #10799 : TeXitoi/rust/shootout-reverse-complement-resurected, ↵bors-142/+70
r=alexcrichton This version is inspired by the best version in C by Mr Ledrug, but without the parallelisation.
2013-12-04rewrite of shootout-reverse-complement.rsGuillaume Pinot-142/+70
This version is inspired by the best version in C by Mr Ledrug, but without the parallelisation.
2013-12-04std::str: remove from_utf8.Huon Wilson-5/+3
This function had type &[u8] -> ~str, i.e. it allocates a string internally, even though the non-allocating version that take &[u8] -> &str and ~[u8] -> ~str are all that is necessary in most circumstances.
2013-11-29libstd: Change `Path::new` to `Path::init`.Patrick Walton-2/+2
2013-11-28shootout-spectralnorm resurection with parallelizationGuillaume Pinot-31/+66
2013-11-26librustc: Fix merge fallout.Patrick Walton-3/+5
2013-11-26librustc: Make `||` lambdas not infer to `proc`sPatrick Walton-2/+2
2013-11-26test: Remove all remaining non-procedure uses of `do`.Patrick Walton-60/+58
2013-11-26librustc: Remove remaining uses of `&fn()` in favor of `||`.Patrick Walton-2/+2
2013-11-26test: Remove most uses of `&fn()` from the tests.Patrick Walton-18/+16
2013-11-26Removed unneccessary `_iter` suffixes from various APIsMarvin Löbel-4/+4
2013-11-24auto merge of #10603 : alexcrichton/rust/no-linked-failure, r=brsonbors-5/+4
The reasons for doing this are: * The model on which linked failure is based is inherently complex * The implementation is also very complex, and there are few remaining who fully understand the implementation * There are existing race conditions in the core context switching function of the scheduler, and possibly others. * It's unclear whether this model of linked failure maps well to a 1:1 threading model Linked failure is often a desired aspect of tasks, but we would like to take a much more conservative approach in re-implementing linked failure if at all. Closes #8674 Closes #8318 Closes #8863
2013-11-24Remove linked failure from the runtimeAlex Crichton-5/+4
The reasons for doing this are: * The model on which linked failure is based is inherently complex * The implementation is also very complex, and there are few remaining who fully understand the implementation * There are existing race conditions in the core context switching function of the scheduler, and possibly others. * It's unclear whether this model of linked failure maps well to a 1:1 threading model Linked failure is often a desired aspect of tasks, but we would like to take a much more conservative approach in re-implementing linked failure if at all. Closes #8674 Closes #8318 Closes #8863
2013-11-22Strip down Cell functionalitySteven Fackler-10/+8
2013-11-18librustc: Convert `~fn()` to `proc()` everywhere.Patrick Walton-1/+1
2013-11-18pidigits resurectedGuillaume Pinot-137/+66
Changes: * default value when no args * license * removed libc printing * use extra::bigint instead of handmade gmp binding
2013-11-17Prettier long string breaking.Guillaume Pinot-2/+2
2013-11-17Clarrify the message for test mode and use u8 instead of i8 for storing bitsGuillaume Pinot-4/+5
2013-11-17resurect shootout-mandelbrot.rsGuillaume Pinot-48/+62
Changes: * add licence; * remove usage of libc and unsafe; * use BufferedWriter to improve performance; * use a DummyWriter to cancel binary output in test.
2013-11-14auto merge of #10478 : TeXitoi/rust/shootout-meteor, r=brsonbors-0/+281
This implementation of the meteor contest implements: - insertion check with bit trick; - pregenetation of every feasible placement of the pieces on the board; - filtering of placement that implies unfeasible board - central symetry breaking related to #2776
2013-11-14Improve variable naming.Guillaume Pinot-7/+8
2013-11-14remove useless Iterate impl, and permute the order of the argument of iterateGuillaume Pinot-9/+4
Writing iterate(x, f) is more logical as rust iterator pipeline is left to right.
2013-11-14Add shootout meteor contest benchmark.Guillaume Pinot-0/+285
This implementation of the meteor contest implements: - insertion check with bit trick; - pregenetation of every feasible placement of the pieces on the board; - filtering of placement that implies unfeasible board - central symetry breaking
2013-11-13Implement native::IoFactoryAlex Crichton-1/+1
This commit re-organizes the io::native module slightly in order to have a working implementation of rtio::IoFactory which uses native implementations. The goal is to seamlessly multiplex among libuv/native implementations wherever necessary. Right now most of the native I/O is unimplemented, but we have existing bindings for file descriptors and processes which have been hooked up. What this means is that you can now invoke println!() from libstd with no local task, no local scheduler, and even without libuv. There's still plenty of work to do on the native I/O factory, but this is the first steps into making it an official portion of the standard library. I don't expect anyone to reach into io::native directly, but rather only std::io primitives will be used. Each std::io interface seamlessly falls back onto the native I/O implementation if the local scheduler doesn't have a libuv one (hurray trait ojects!)
2013-11-12Fixed xfail for nbody shootout benchmark by correcting command line parse.Carol W-9/+13
Cleaned up unneeded imports and type changes to resolve compiler warnings.
2013-11-11Move std::rt::io to std::ioAlex Crichton-12/+12
2013-11-11Remove #[fixed_stack_segment] and #[rust_stack]Alex Crichton-12/+0
These two attributes are no longer useful now that Rust has decided to leave segmented stacks behind. It is assumed that the rust task's stack is always large enough to make an FFI call (due to the stack being very large). There's always the case of stack overflow, however, to consider. This does not change the behavior of stack overflow in Rust. This is still normally triggered by the __morestack function and aborts the whole process. C stack overflow will continue to corrupt the stack, however (as it did before this commit as well). The future improvement of a guard page at the end of every rust stack is still unimplemented and is intended to be the mechanism through which we attempt to detect C stack overflow. Closes #8822 Closes #10155
2013-11-10temporarily disable tests on android and tagging issue number #10393Young-il Choi-0/+2
2013-11-08std::ascii: Provide a copyless [Ascii] -> str method.Huon Wilson-6/+2
This renames to_str_ascii to as_str_ascii and makes it non-copying, which is possible now that strings no longer have a hidden extra byte/null terminator. Fixes #6120.
2013-11-03Fill out the remaining functionality in io::fileAlex Crichton-4/+4
This adds bindings to the remaining functions provided by libuv, all of which are useful operations on files which need to get exposed somehow. Some highlights: * Dropped `FileReader` and `FileWriter` and `FileStream` for one `File` type * Moved all file-related methods to be static methods under `File` * All directory related methods are still top-level functions * Created `io::FilePermission` types (backed by u32) that are what you'd expect * Created `io::FileType` and refactored `FileStat` to use FileType and FilePermission * Removed the expanding matrix of `FileMode` operations. The mode of reading a file will not have the O_CREAT flag, but a write mode will always have the O_CREAT flag. Closes #10130 Closes #10131 Closes #10121
2013-11-03Remove all blocking std::os blocking functionsAlex Crichton-5/+4
This commit moves all thread-blocking I/O functions from the std::os module. Their replacements can be found in either std::rt::io::file or in a hidden "old_os" module inside of native::file. I didn't want to outright delete these functions because they have a lot of special casing learned over time for each OS/platform, and I imagine that these will someday get integrated into a blocking implementation of IoFactory. For now, they're moved to a private module to prevent bitrot and still have tests to ensure that they work. I've also expanded the extensions to a few more methods defined on Path, most of which were previously defined in std::os but now have non-thread-blocking implementations as part of using the current IoFactory. The api of io::file is in flux, but I plan on changing it in the next commit as well. Closes #10057