about summary refs log tree commit diff
path: root/src/test/bench
AgeCommit message (Collapse)AuthorLines
2014-05-27std: Remove String's to_ownedRicho Healey-19/+19
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-25/+25
[breaking-change]
2014-05-23std: Move simd to core::simd and reexport. #1457Brian Anderson-1/+1
[breaking-change]
2014-05-23auto merge of #14360 : alexcrichton/rust/remove-deprecated, r=kballardbors-1/+1
These have all been deprecated for awhile now, so it's likely time to start removing them.
2014-05-23syntax: Clean out obsolete syntax parsingAlex Crichton-1/+1
All of these features have been obsolete since February 2014, where most have been obsolete since 2013. There shouldn't be any more need to keep around the parser hacks after this length of time.
2014-05-22libcore: Remove all uses of `~str` from `libcore`.Patrick Walton-37/+48
[breaking-change]
2014-05-16libgetopts: Remove all uses of `~str` from `libgetopts`Patrick Walton-1/+1
2014-05-15core: Update all tests for fmt movementAlex Crichton-2/+4
2014-05-15shootout-mandelbrot: Precalc initial values & use SIMD in the main loop. ↵Kevin Butler-61/+125
+80-100%
2014-05-15shootout-mandlebrot: calculate two bits of the result per inner loop, +10-15%Kevin Butler-20/+52
2014-05-14test: Remove all uses of `~str` from the test suite.Patrick Walton-49/+54
2014-05-13Touch up and rebase previous commitsAlex Crichton-9/+10
* Added `// no-pretty-expanded` to pretty-print a test, but not run it through the `expanded` variant. * Removed #[deriving] and other expanded attributes after they are expanded * Removed hacks around &str and &&str and friends (from both the parser and the pretty printer). * Un-ignored a bunch of tests
2014-05-12shootout-nbody improvementGuillaume Pinot-23/+20
- factorize operation - factorize loop (and gain a level of indentation) - ~5% faster Thanks to @Ryman for the propositions :)
2014-05-11auto merge of #14090 : TeXitoi/rust/shootout-nbody-improvement, r=alexcrichtonbors-97/+87
- minimize bound check - factorise operations - use x, y, z instead of [f64, ..3] - ~1.15 faster
2014-05-10shootout-nbody improvementsGuillaume Pinot-97/+87
- minimize bound check - factorise operations - use x, y, z instead of [f64, ..3] - ~1.15 faster
2014-05-09shootout-meteor improvementGuillaume Pinot-90/+111
- 5-10% of raw speedup - parallelization of the search
2014-05-08Handle fallout in bench testsKevin Ballard-5/+18
2014-05-06librustc: Remove `~EXPR`, `~TYPE`, and `~PAT` from the language, exceptPatrick Walton-18/+18
for `~str`/`~[]`. Note that `~self` still remains, since I forgot to add support for `Box<self>` before the snapshot. How to update your code: * Instead of `~EXPR`, you should write `box EXPR`. * Instead of `~TYPE`, you should write `Box<Type>`. * Instead of `~PATTERN`, you should write `box PATTERN`. [breaking-change]
2014-05-04auto merge of #13921 : TeXitoi/rust/shootout-spectralnorm-tweaks, r=alexcrichtonbors-1/+5
- using libgreen to optimize CPU usage - less tasks to limit wasted resources Here, on a one core 2 threads CPU, new version is ~1.2 faster. May be better with more core.
2014-05-03shootout-spectralnorm tweaksGuillaume Pinot-1/+5
- using libgreen to optimize CPU usage - less tasks to limit wasted resources Here, on a one core 2 threads CPU, new version is ~1.2 faster. May be better with more core.
2014-05-03shootout-mandelbrot rewriteGuillaume Pinot-55/+52
- removed warning - improved performances - parallelization
2014-04-25Ignore regex tests (regular, cfail and benchmark) on Windows (for now).Andrew Gallant-0/+2
2014-04-25Add a regex crate to the Rust distribution.Andrew Gallant-0/+94
Also adds a regex_macros crate, which provides natively compiled regular expressions with a syntax extension. Closes #3591. RFC: 0007-regexps
2014-04-23auto merge of #13675 : sfackler/rust/taskbuilder-new, r=alexcrichtonbors-4/+7
The constructor for `TaskBuilder` is being changed to an associated function called `new` for consistency with the rest of the standard library. Closes #13666 [breaking-change]
2014-04-23Move task::task() to TaskBuilder::new()Steven Fackler-4/+7
The constructor for `TaskBuilder` is being changed to an associated function called `new` for consistency with the rest of the standard library. Closes #13666 [breaking-change]
2014-04-22auto merge of #13667 : TeXitoi/rust/shootout-chameneos-redux-fix, r=alexcrichtonbors-100/+78
* fix official shootout test (spacing) * use libgreen to improve performances * simplify and modernize code * remove warnings
2014-04-21fix and improve shootout-chameneos-reduxGuillaume Pinot-100/+78
* fix official shootout test (spacing) * use libgreen to improve performances * simplify and modernize code * remove warnings
2014-04-21shootout-threadring rewriteGuillaume Pinot-49/+19
* simplify the code * remove trace to satisfy official shootout test * use libgreen to improve performances
2014-04-20auto merge of #13633 : TeXitoi/rust/shootout-fannkuch-redux-rewrite, ↵bors-75/+46
r=alexcrichton Less bound checking and parallelisation. Brute speed improvement is about 15% faster. The unsafe block improve the brute speed by about 5%.
2014-04-20shootout-fannkuch-redux rewriteGuillaume Pinot-75/+46
Less bound checking and parallelisation. Brute speed improvement is about 15% faster.
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-38/+40
2014-04-18Update the rest of the compiler with ~[T] changesAlex Crichton-13/+13
2014-04-17auto merge of #13575 : TeXitoi/rust/shootout-knucleotide-parallel, ↵bors-19/+24
r=alexcrichton
2014-04-17parallelisation of shootout-k-nucleotideGuillaume Pinot-19/+24
2014-04-15Use the unsigned integer types for bitwise intrinsics.Huon Wilson-4/+2
Exposing ctpop, ctlz, cttz and bswap as taking signed i8/i16/... is just exposing the internal LLVM names pointlessly (LLVM doesn't have "signed integers" or "unsigned integers", it just has sized integer types with (un)signed *operations*). These operations are semantically working with raw bytes, which the unsigned types model better.
2014-04-14Use new attribute syntax in python files in src/etc too (#13478)Manish Goregaokar-3/+3
2014-04-12auto merge of #13448 : alexcrichton/rust/rework-chan-return-values, r=brsonbors-7/+7
There are currently a number of return values from the std::comm methods, not all of which are necessarily completely expressive: * `Sender::try_send(t: T) -> bool` This method currently doesn't transmit back the data `t` if the send fails due to the other end having disconnected. Additionally, this shares the name of the synchronous try_send method, but it differs in semantics in that it only has one failure case, not two (the buffer can never be full). * `SyncSender::try_send(t: T) -> TrySendResult<T>` This method accurately conveys all possible information, but it uses a custom type to the std::comm module with no convenience methods on it. Additionally, if you want to inspect the result you're forced to import something from `std::comm`. * `SyncSender::send_opt(t: T) -> Option<T>` This method uses Some(T) as an "error value" and None as a "success value", but almost all other uses of Option<T> have Some/None the other way * `Receiver::try_recv(t: T) -> TryRecvResult<T>` Similarly to the synchronous try_send, this custom return type is lacking in terms of usability (no convenience methods). With this number of drawbacks in mind, I believed it was time to re-work the return types of these methods. The new API for the comm module is: Sender::send(t: T) -> () Sender::send_opt(t: T) -> Result<(), T> SyncSender::send(t: T) -> () SyncSender::send_opt(t: T) -> Result<(), T> SyncSender::try_send(t: T) -> Result<(), TrySendError<T>> Receiver::recv() -> T Receiver::recv_opt() -> Result<T, ()> Receiver::try_recv() -> Result<T, TryRecvError> The notable changes made are: * Sender::try_send => Sender::send_opt. This renaming brings the semantics in line with the SyncSender::send_opt method. An asychronous send only has one failure case, unlike the synchronous try_send method which has two failure cases (full/disconnected). * Sender::send_opt returns the data back to the caller if the send is guaranteed to fail. This method previously returned `bool`, but then it was unable to retrieve the data if the data was guaranteed to fail to send. There is still a race such that when `Ok(())` is returned the data could still fail to be received, but that's inherent to an asynchronous channel. * Result is now the basis of all return values. This not only adds lots of convenience methods to all return values for free, but it also means that you can inspect the return values with no extra imports (Ok/Err are in the prelude). Additionally, it's now self documenting when something failed or not because the return value has "Err" in the name. Things I'm a little uneasy about: * The methods send_opt and recv_opt are not returning options, but rather results. I felt more strongly that Option was the wrong return type than the _opt prefix was wrong, and I coudn't think of a much better name for these methods. One possible way to think about them is to read the _opt suffix as "optionally". * Result<T, ()> is often better expressed as Option<T>. This is only applicable to the recv_opt() method, but I thought it would be more consistent for everything to return Result rather than one method returning an Option. Despite my two reasons to feel uneasy, I feel much better about the consistency in return values at this point, and I think the only real open question is if there's a better suffix for {send,recv}_opt. Closes #11527
2014-04-10std: Make std::comm return types consistentAlex Crichton-7/+7
There are currently a number of return values from the std::comm methods, not all of which are necessarily completely expressive: Sender::try_send(t: T) -> bool This method currently doesn't transmit back the data `t` if the send fails due to the other end having disconnected. Additionally, this shares the name of the synchronous try_send method, but it differs in semantics in that it only has one failure case, not two (the buffer can never be full). SyncSender::try_send(t: T) -> TrySendResult<T> This method accurately conveys all possible information, but it uses a custom type to the std::comm module with no convenience methods on it. Additionally, if you want to inspect the result you're forced to import something from `std::comm`. SyncSender::send_opt(t: T) -> Option<T> This method uses Some(T) as an "error value" and None as a "success value", but almost all other uses of Option<T> have Some/None the other way Receiver::try_recv(t: T) -> TryRecvResult<T> Similarly to the synchronous try_send, this custom return type is lacking in terms of usability (no convenience methods). With this number of drawbacks in mind, I believed it was time to re-work the return types of these methods. The new API for the comm module is: Sender::send(t: T) -> () Sender::send_opt(t: T) -> Result<(), T> SyncSender::send(t: T) -> () SyncSender::send_opt(t: T) -> Result<(), T> SyncSender::try_send(t: T) -> Result<(), TrySendError<T>> Receiver::recv() -> T Receiver::recv_opt() -> Result<T, ()> Receiver::try_recv() -> Result<T, TryRecvError> The notable changes made are: * Sender::try_send => Sender::send_opt. This renaming brings the semantics in line with the SyncSender::send_opt method. An asychronous send only has one failure case, unlike the synchronous try_send method which has two failure cases (full/disconnected). * Sender::send_opt returns the data back to the caller if the send is guaranteed to fail. This method previously returned `bool`, but then it was unable to retrieve the data if the data was guaranteed to fail to send. There is still a race such that when `Ok(())` is returned the data could still fail to be received, but that's inherent to an asynchronous channel. * Result is now the basis of all return values. This not only adds lots of convenience methods to all return values for free, but it also means that you can inspect the return values with no extra imports (Ok/Err are in the prelude). Additionally, it's now self documenting when something failed or not because the return value has "Err" in the name. Things I'm a little uneasy about: * The methods send_opt and recv_opt are not returning options, but rather results. I felt more strongly that Option was the wrong return type than the _opt prefix was wrong, and I coudn't think of a much better name for these methods. One possible way to think about them is to read the _opt suffix as "optionally". * Result<T, ()> is often better expressed as Option<T>. This is only applicable to the recv_opt() method, but I thought it would be more consistent for everything to return Result rather than one method returning an Option. Despite my two reasons to feel uneasy, I feel much better about the consistency in return values at this point, and I think the only real open question is if there's a better suffix for {send,recv}_opt. Closes #11527
2014-04-10auto merge of #13440 : huonw/rust/strbuf, r=alexcrichtonbors-54/+57
libstd: Implement `StrBuf`, a new string buffer type like `Vec`, and port all code over to use it. Rebased & tests-fixed version of https://github.com/mozilla/rust/pull/13269
2014-04-11Fix tests. Add Vec<u8> conversion to StrBuf.Huon Wilson-51/+52
2014-04-10Remove some internal ~[] from several libraries.Huon Wilson-1/+1
Some straggling instances of `~[]` across a few different libs. Also, remove some public ones from workcache.
2014-04-10libstd: Implement `StrBuf`, a new string buffer type like `Vec`, andPatrick Walton-7/+9
port all code over to use it.
2014-04-08Improve searching for XXX in tidy script (#3303)Boris Egorov-1/+1
Few places where previous version of tidy script cannot find XXX: * inside one-line comment preceding by a few spaces; * inside multiline comments (now it finds it if multiline comment starts on the same line with XXX). Change occurences of XXX found by new tidy script.
2014-04-06auto merge of #13165 : sfackler/rust/io-vec, r=alexcrichtonbors-3/+3
`Reader`, `Writer`, `MemReader`, `MemWriter`, and `MultiWriter` now work with `Vec<u8>` instead of `~[u8]`. This does introduce some extra copies since `from_utf8_owned` isn't usable anymore, but I think that can't be helped until `~str`'s representation changes.
2014-04-06De-~[] Mem{Reader,Writer}Steven Fackler-1/+1
2014-04-06De-~[] Reader and WriterSteven Fackler-2/+2
There's a little more allocation here and there now since from_utf8_owned can't be used with Vec.
2014-04-06syntax: Tweak parsing lifetime bounds on closuresAlex Crichton-2/+2
In summary these are some example transitions this change makes: 'a || => ||: 'a proc:Send() => proc():Send The intended syntax for closures is to put the lifetime bound not at the front but rather in the list of bounds. Currently there is no official support in the AST for bounds that are not 'static, so this case is currently specially handled in the parser to desugar to what the AST is expecting. Additionally, this moves the bounds on procedures to the correct position, which is after the argument list. The current grammar for closures and procedures is: procedure := 'proc' [ '<' lifetime-list '>' ] '(' arg-list ')' [ ':' bound-list ] [ '->' type ] closure := [ 'unsafe' ] ['<' lifetime-list '>' ] '|' arg-list '|' [ ':' bound-list ] [ '->' type ] lifetime-list := lifetime | lifetime ',' lifetime-list arg-list := ident ':' type | ident ':' type ',' arg-list bound-list := bound | bound '+' bound-list bound := path | lifetime This does not currently handle the << ambiguity in `Option<<'a>||>`, I am deferring that to a later patch. Additionally, this removes the support for the obsolete syntaxes of ~fn and &fn. Closes #10553 Closes #10767 Closes #11209 Closes #11210 Closes #11211
2014-04-03Test fixes from the rollupAlex Crichton-0/+10
2014-04-02Fix fallout of requiring uint indicesAlex Crichton-20/+21
2014-04-01auto merge of #13115 : huonw/rust/rand-errors, r=alexcrichtonbors-1/+1
move errno -> IoError converter into std, bubble up OSRng errors Also adds a general errno -> `~str` converter to `std::os`, and makes the failure messages for the things using `OSRng` (e.g. (transitively) the task-local RNG, meaning hashmap initialisation failures aren't such a black box).