Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upTracking issue for `push_all` stabilization #27744
Comments
aturon
added
T-libs
B-unstable
labels
Aug 12, 2015
This comment has been minimized.
This comment has been minimized.
|
cc #26902 |
This comment has been minimized.
This comment has been minimized.
|
Unless specialization lands soon, I'm tempted to just stabilize this as "this will be deprecated when it's no longer necessary". |
Ms2ger
referenced this issue
Aug 16, 2015
Open
Tracking: Unstable Rust feature gates used by Servo #5286
This comment has been minimized.
This comment has been minimized.
jnordwick
commented
Aug 20, 2015
|
Have the IR (lack of) hinting issues been worked out? |
sfackler
added
the
I-nominated
label
Nov 4, 2015
This comment has been minimized.
This comment has been minimized.
|
Nominating for 1.6 discussion. |
alexcrichton
added
final-comment-period
and removed
I-nominated
labels
Nov 5, 2015
This comment has been minimized.
This comment has been minimized.
|
The conclusion of the libs team is that we can stabilize this and just deprecate it once specialization lands and makes this function obsolete. |
This comment has been minimized.
This comment has been minimized.
|
IMO, planned deprecation defeats the point of stabilizing it in the first place. i.e. I still won't want to use it if it's definitely going to be yanked out later... |
This comment has been minimized.
This comment has been minimized.
|
It's not going to be yanked out ever if stabilized. It will eventually be deprecated in favor of extend, but remain in place. |
This comment has been minimized.
This comment has been minimized.
|
Ok, I thought deprecation was more aggressive than that. No problem then. |
This comment has been minimized.
This comment has been minimized.
briansmith
commented
Nov 5, 2015
I agree with this.
IMO, that would be a poor choice. In the discussion on One of the main reasons for moving ahead with Conversely, if useful performance guarantees are added to it (at most one resizing of the array, at most one bounds check on each array, equivalent to It is also unfortunate that the name |
This comment has been minimized.
This comment has been minimized.
|
Would it be worth considering another name for this method? I find |
briansmith
referenced this issue
Nov 6, 2015
Closed
Tracking issue for `clone_from_slice` stabilization #27750
This comment has been minimized.
This comment has been minimized.
briansmith
commented
Nov 6, 2015
|
I propose renaming this function to |
This comment has been minimized.
This comment has been minimized.
I don't think there's widespread agreement about adding ad hoc specializations/intrinsics, barring very exceptional circumstances. But @rust-lang/lang and @rust-lang/compiler may want to weigh in.
I'm a little confused about the overall thrust here. To be clear, the reason that Now, that said, i think the performance guarantees you're raising are an important (though orthogonal) point. One uncomfortable thing about the current One way to address this desire might be to add more ad hoc intrinsics, but I wonder if there's any way we might eventually allow "inline MIR", so to speak, and whether that'd be enough to express the precise code you want to generate. On the whole, I still think it's reasonable to stabilize something
@alexcrichton didn't mention this, but no one was particularly a fan of the name. |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
+1000 to not adding an ad hoc hack here. However, I'd love to see some kind of push_all stabilised - it's probably the unstable function I use the most. |
This comment has been minimized.
This comment has been minimized.
Absolutely, I would say the same thing: it's very unlikely there is any agreement about it. It's just my crazy idea. |
This comment has been minimized.
This comment has been minimized.
|
On Mon, Nov 09, 2015 at 01:04:45PM -0800, Nick Cameron wrote:
and +1K more |
This comment has been minimized.
This comment has been minimized.
|
Notice that the |
This comment has been minimized.
This comment has been minimized.
|
The libs team discussed this during triage today and the decision was to stabilize while renaming the method to |
aturon commentedAug 12, 2015
The
Vec::push_allmethod special-cases pushing a slice onto a vector, and historically has performed much better than usingextend(depending on how LLVM optimizations are working out).We need to offer a method with maximal performance somehow, but ideally this would come from
extend, either through optimization or through impl specialization.