| Age | Commit message (Collapse) | Author | Lines |
|
Avoids the overhead of read_char for every character.
Benchmark reading example.json 10 times from
https://code.google.com/p/rapidjson/wiki/Performance
Before: 2.55s
After: 0.16s
Regression testing is already done by isrustfastyet.
|
|
|
|
|
|
Conflicts:
src/libstd/rt/uvio.rs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
In particular, it is not valid to go around passing uninitialized or zero'd
memory as arguments. Rust should generally be free to assume that the arguments
it gets are valid input values, but the output of intrinsics::uninit() and
intrinsics::init() are not (e.g., an @T is just null, leading to an error
if we should try to increment the ref count).
|
|
|
|
This can be useful for inserting debugging code at different steps in an iterator pipeline.
|
|
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.
|
|
This is work continued from the now landed #7495 and #7521 pulls.
Removing the headers from unique vectors is another project, so I've separated the allocator.
|
|
|
|
remove some method resolve workarounds
|
|
|
|
|
|
|
|
|
|
They was previously missing
|
|
|
|
|
|
|
|
|
|
It's broken/unmaintained and needs to be rewritten to avoid managed
pointers and needless copies. A full rewrite is necessary and the API
will need to be redone so it's not worth keeping this around (#7628).
Closes #2236, #2744
|
|
Implement methods `.pop_opt() -> Option<T>` and `.shift_opt() -> Option<T>` to allow retrieval of front/back of a vec in one operation without fail. .pop() and .shift() are changed to reuse the former two methods.
Follows the naming of the previous method .head_opt()
|
|
Change the signature of Iterator.size_hint() to always have a lower bound.
Implement .size_hint() on all remaining iterators (if it differs from the default).
|
|
It's broken/unmaintained and needs to be rewritten to avoid managed
pointers and needless copies. A full rewrite is necessary and the API
will need to be redone so it's not worth keeping this around.
Closes #2236, #2744
|
|
They simply byte-swap an integer to a specific endian, like the hton* functions in C.
These intrinsics are synthesized, so maybe they should be in another file. But since they are just a single line of code each, based on the bswap intrinsics and aren't really intended for public consumption I thought they would fit in the intrinsics file.
The next step working on this could be to expose a trait / generic function for byteswapping.
|
|
Since ' ' is by far one of the most common characters, it is worthwhile
to put it first, and short-circuit the rest of the function.
On the same JSON benchmark, as the json_perf improvement, reading example.json
10 times from https://code.google.com/p/rapidjson/wiki/Performance.
Before: 0.16s
After: 0.11s
|
|
|
|
Add a function to safely retrieve the first element of a ~[T], as
Option<T>. Implement shift() using shift_opt().
Add tests for both .shift() and .shift_opt()
|
|
Add a function to safely retrieve the last element of a ~[T], as
Option<T>. Implement pop() using pop_opt(); it benches the same as the
old implementation when tested with optimization level 2.
|
|
Every iterator adaptor now has an implementation of .size_hint() that
makes sense, except for when the default of (0, None) is correct.
|
|
Remove the Option wrapper around the lower bound. None is semantically
the same as Size(0), so there's no point in having a distinction.
|
|
I'm leaving the Sized kind undocumented since it isn't fully implemented
yet.
|
|
vec: Fix size_hint() of reverse iterators
|
|
|
|
Conflicts:
src/libextra/test.rs
src/libstd/at_vec.rs
src/libstd/cleanup.rs
src/libstd/rt/comm.rs
src/libstd/rt/global_heap.rs
src/libstd/task/spawn.rs
src/libstd/unstable/lang.rs
src/libstd/vec.rs
src/rt/rustrt.def.in
src/test/run-pass/extern-pub.rs
|
|
|
|
iterator.
|
|
|
|
|
|
|
|
iterators.
|
|
consume_reverse, map_consume}.
|
|
Fixes #7558
|
|
Adds a lint for `static some_lowercase_name: uint = 1;`. Warning by default since it causes confusion, e.g. `static a: uint = 1; ... let a = 2;` => `error: only refutable patterns allowed here`.
|