about summary refs log tree commit diff
path: root/src/test/bench
AgeCommit message (Collapse)AuthorLines
2013-08-18auto merge of #8560 : kballard/rust/reserve-yield, r=pcwaltonbors-1/+1
Rename task::yield() to task::deschedule(). Fixes #8494.
2013-08-17Fix warnings it testsErick Tryzelaar-14/+0
2013-08-16Reserve 'yield' keywordKevin Ballard-1/+1
Rename task::yield() to task::deschedule(). Fixes #8494.
2013-08-10std: Rename Iterator.transform -> .mapErick Tryzelaar-7/+7
cc #5898
2013-08-10Mass rename of .consume{,_iter}() to .move_iter()Erick Tryzelaar-8/+8
cc #7887
2013-08-08auto merge of #8356 : toddaaro/rust/ws, r=brsonbors-0/+164
This pull request converts the scheduler from a naive shared queue scheduler to a naive workstealing scheduler. The deque is still a queue inside a lock, but there is still a substantial performance gain. Fiddling with the messaging benchmark I got a ~10x speedup and observed massively reduced memory usage. There are still *many* locations for optimization, but based on my experience so far it is a clear performance win as it is now.
2013-08-08auto merge of #8385 : cmr/rust/big-rollup, r=alexcrichtonbors-9/+6
This is a fairly large rollup, but I've tested everything locally, and none of it should be platform-specific. r=alexcrichton (bdfdbdd) r=brson (d803c18) r=alexcrichton (a5041d0) r=bstrie (317412a) r=alexcrichton (135c85e) r=thestinger (8805baa) r=pcwalton (0661178) r=cmr (9397fe0) r=cmr (caa4135) r=cmr (6a21d93) r=cmr (4dc3379) r=cmr (0aa5154) r=cmr (18be261) r=thestinger (f10be03)
2013-08-08Enabled workstealing in the scheduler. Previously we had one global work ↵toddaaro-0/+164
queue shared by each scheduler. Now there is a separate work queue for each scheduler, and work is "stolen" from other queues when it is exhausted locally.
2013-08-07Implement DoubleEndedIterator on RangeKevin Ballard-9/+6
Range is now invertable as long as its element type conforms to Integer. Remove int::range_rev() et al in favor of range().invert().
2013-08-07test: Fix deadlock in task-perf-linked-failureBrian Anderson-1/+4
2013-08-07test: xfail a bunch of tests that are incorrectly reading os::args()[1]Brian Anderson-0/+10
2013-08-06remove `extra::iter`Daniel Micay-12/+12
This module provided adaptors for the old internal iterator protocol, but they proved to be quite unreadable and are not generic enough to handle borrowed pointers well. Since Rust no longer defines an internal iteration protocol, I don't think there's going to be any reuse via these adaptors.
2013-08-05Updated std::Option, std::Either and std::ResultMarvin Löbel-34/+34
- Made naming schemes consistent between Option, Result and Either - Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None) - Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead
2013-08-05Add extra::arena::Arena::new{, _with_size}.OGINO Masanori-4/+4
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2013-08-03remove obsolete `foreach` keywordDaniel Micay-96/+96
this has been replaced by `for`
2013-08-03replace all remaining `for` with `foreach` or `do`Daniel Micay-6/+9
2013-08-02librustc: Disallow "unsafe" for external functionsPatrick Walton-1/+1
2013-08-02librustc: Introduce a new visitor type based on traits and port syntax to it.Patrick Walton-1/+1
This is preparation for removing `@fn`. This does *not* use default methods yet, because I don't know whether they work. If they do, a forthcoming PR will use them. This also changes the precedence of `as`.
2013-08-02replace `range` with an external iteratorDaniel Micay-70/+68
2013-08-01auto merge of #8170 : brson/rust/nopipes, r=pcwaltonbors-321/+0
The pipes compiler produced data types that encoded efficient and safe bounded message passing protocols between two endpoints. It was also capable of producing unbounded protocols. It was useful research but was arguably done before its proper time. I am removing it for the following reasons: * In practice we used it only for producing the `oneshot` protcol and the unbounded `stream` protocol and all communication in Rust use those. * The interface between the proto! macro and the standard library has a large surface area and was difficult to maintain through language and library changes. * It is now written in an old dialect of Rust and generates code which would likely be considered non-idiomatic. * Both the compiler and the runtime are difficult to understand, and likewise the relationship between the generated code and the library is hard to understand. Debugging is difficult. * The new scheduler implements `stream` and `oneshot` by hand in a way that will be significantly easier to maintain. This shouldn't be taken as an indication that 'channel protocols' for Rust are not worth pursuing again in the future. Concerned parties may include: @graydon, @pcwalton, @eholk, @bblum The most likely candidates for closing are #7666, #3018, #3020, #7021, #7667, #7303, #3658, #3295.
2013-08-01auto merge of #8190 : thestinger/rust/for, r=thestingerbors-13/+13
2013-08-01Remove the pipes compilerBrian Anderson-321/+0
The pipes compiler produced data types that encoded efficient and safe bounded message passing protocols between two endpoints. It was also capable of producing unbounded protocols. It was useful research but was arguably done before its proper time. I am removing it for the following reasons: * In practice we used it only for producing the `oneshot` and `stream` unbounded protocols and all communication in Rust use those. * The interface between the proto! macro and the standard library has a large surface area and was difficult to maintain through language and library changes. * It is now written in an old dialect of Rust and generates code which would likely be considered non-idiomatic. * Both the compiler and the runtime are difficult to understand, and likewise the relationship between the generated code and the library is hard to understand. Debugging is difficult. * The new scheduler implements `stream` and `oneshot` by hand in a way that will be significantly easier to maintain. This shouldn't be taken as an indication that 'channel protocols' for Rust are not worth pursuing again in the future.
2013-08-01std: Change `Times` trait to use `do` instead of `for`blake2-ppc-13/+13
Change the former repetition:: for 5.times { } to:: do 5.times { } .times() cannot be broken with `break` or `return` anymore; for those cases, use a numerical range loop instead.
2013-08-01auto merge of #8164 : brson/rust/noportset, r=pcwaltonbors-12/+12
...haredChan.
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-32/+32
2013-07-31std: Remove PortSet. Not supported by new scheduler. Replace uses with ↵Brian Anderson-12/+12
SharedChan.
2013-07-28auto merge of #8069 : erickt/rust/maikklein, r=ericktbors-4/+4
Good evening, This is a superset of @MaikKlein's #7969 commit, that I've fixed up to compile. I had a couple commits I wanted to do on top of @MaikKlein's work that I didn't want to bitrot.
2013-07-27to_either + fixesErick Tryzelaar-4/+4
2013-07-27Change concurrency primitives to standard naming conventionsSteven Stewart-Gallus-11/+11
To be more specific: `UPPERCASETYPE` was changed to `UppercaseType` `type_new` was changed to `Type::new` `type_function(value)` was changed to `value.method()`
2013-07-24fix fmt! usageDaniel Micay-1/+1
2013-07-24Change 'print(fmt!(...))' to printf!/printfln! in src/test/Birunthan Mohanathas-45/+41
2013-07-20Fix warnings in src/test/bench tests. Nobody will ever care.Ben Blum-78/+60
2013-07-18hashmap: Remove .consume() has rename .consume_iter() to .consume()blake2-ppc-3/+3
Updated all users of HashMap, HashSet old .consume() to use .consume() with a for loop. Since .consume() takes the map or set by value, it needs awkward extra code to in librusti's use of @mut HashMap, where the map value can not be directly moved out.
2013-07-17librustc: Remove some extra "copy" keywords that came in before this change ↵Patrick Walton-1/+1
merged.
2013-07-17test: Fix tests.Patrick Walton-4/+0
2013-07-17test: Fix tests.Patrick Walton-20/+13
2013-07-17librustc: Remove all uses of the `Copy` bound.Patrick Walton-8/+5
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-34/+52
2013-07-16auto merge of #7831 : ozten/rust/issues-7764-swap_unwarp-take-unwrap, r=pcwaltonbors-4/+4
Fixes Issue #7764 Running `make check` I do get a failure: test rt::io::extensions::test::push_bytes ... ok rustest rt::comm::test::oneshot_single_thread_send_port_close ... t: task failed at 'Unhandled condition: read_error: {kind: OtherIoError, desc: "Placeholder error. You shouldn\'t be seeing this", detail: None}', /Users/shout/Projects/rust/src/libstd/condition.rs:50 /bin/sh: line 1: 35056 Abort trap: 6 x86_64-apple-darwin/stage2/test/stdtest-x86_64-apple-darwin --logfile tmp/check-stage2-T-x86_64-apple-darwin-H-x86_64-apple-darwin-std.log make: *** [tmp/check-stage2-T-x86_64-apple-darwin-H-x86_64-apple-darwin-std.ok] Error 134
2013-07-16Rename Option swap_unwrap to take_unwrap. Fixes Issue#7764Austin King-4/+4
2013-07-17Clean-up tests after debug!/std-macros change.Huon Wilson-7/+7
The entire testsuite is converted to using info! rather than debug! because some depend on the code within the debug! being trans'd.
2013-07-13Un-broke benchmarksSteven Fackler-5/+5
2013-07-12auto merge of #7696 : glinscott/rust/utf8_perf, r=cmrbors-0/+24
Moves multibyte code to it's own function to make char_range_at easier to inline, and faster for single and multibyte chars. Benchmarked reading example.json 100 times, 1.18s before, 1.08s after. Also, optimize str::is_utf8 for the single and multibyte case Before: is_utf8_ascii: 272.355162 ms is_utf8_multibyte: 167.337334 ms After: is_utf8_ascii: 218.088049 ms is_utf8_multibyte: 134.836722 ms
2013-07-11Add is_utf8 bench testsGary Linscott-0/+24
Before: is_utf8_ascii: 272.355162 ms is_utf8_multibyte: 167.337334 ms After: is_utf8_ascii: 218.088049 ms is_utf8_multibyte: 134.836722 ms
2013-07-11extra: Rename deque::Deque to ringbuf::RingBuf and impl trait Dequeblake2-ppc-5/+6
Let RingBuf have a logical name for a concrete type, and Deque is used for the Deque trait (implemented by RingBuf and dlist).
2013-07-09auto merge of #7117 : jensnockert/rust/freestanding, r=cmrbors-11/+8
The free-standing functions in f32, f64, i8, i16, i32, i64, u8, u16, u32, u64, float, int, and uint are replaced with generic functions in num instead. This means that instead of having to know everywhere what the type is, like ~~~ f64::sin(x) ~~~ You can simply write code that uses the type-generic versions in num instead, this works for all types that implement the corresponding trait in num. ~~~ num::sin(x) ~~~ Note 1: If you were previously using any of those functions, just replace them with the corresponding function with the same name in num. Note 2: If you were using a function that corresponds to an operator, use the operator instead. Note 3: This is just https://github.com/mozilla/rust/pull/7090 reopened against master.
2013-07-08And I forgot to run the benchmarks after rebasingJens Nockert-10/+7
2013-07-08Fix pretty printer, which was ignoring `ref` in irrefutable patternsNiko Matsakis-2/+2
2013-07-08 Replaces the free-standing functions in f32, &c.Jens Nockert-1/+1
The free-standing functions in f32, f64, i8, i16, i32, i64, u8, u16, u32, u64, float, int, and uint are replaced with generic functions in num instead. If you were previously using any of those functions, just replace them with the corresponding function with the same name in num. Note: If you were using a function that corresponds to an operator, use the operator instead.
2013-07-07remove some method resolve workaroundsDaniel Micay-4/+4