{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/47115","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/47115/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/47115/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/47115/events","html_url":"https://github.com/rust-lang/rust/issues/47115","id":285338600,"node_id":"MDU6SXNzdWUyODUzMzg2MDA=","number":47115,"title":"Tracking issue for exact_chunks/_mut; slice chunks with exact size","user":{"login":"sdroege","id":301846,"node_id":"MDQ6VXNlcjMwMTg0Ng==","avatar_url":"https://avatars3.githubusercontent.com/u/301846?v=4","gravatar_id":"","url":"https://api.github.com/users/sdroege","html_url":"https://github.com/sdroege","followers_url":"https://api.github.com/users/sdroege/followers","following_url":"https://api.github.com/users/sdroege/following{/other_user}","gists_url":"https://api.github.com/users/sdroege/gists{/gist_id}","starred_url":"https://api.github.com/users/sdroege/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdroege/subscriptions","organizations_url":"https://api.github.com/users/sdroege/orgs","repos_url":"https://api.github.com/users/sdroege/repos","events_url":"https://api.github.com/users/sdroege/events{/privacy}","received_events_url":"https://api.github.com/users/sdroege/received_events","type":"User","site_admin":false},"labels":[{"id":246778137,"node_id":"MDU6TGFiZWwyNDY3NzgxMzc=","url":"https://api.github.com/repos/rust-lang/rust/labels/B-unstable","name":"B-unstable","color":"d304cb","default":false},{"id":650846969,"node_id":"MDU6TGFiZWw2NTA4NDY5Njk=","url":"https://api.github.com/repos/rust-lang/rust/labels/C-tracking-issue","name":"C-tracking-issue","color":"f5f1fd","default":false},{"id":211668062,"node_id":"MDU6TGFiZWwyMTE2NjgwNjI=","url":"https://api.github.com/repos/rust-lang/rust/labels/T-libs","name":"T-libs","color":"bfd4f2","default":false},{"id":919710011,"node_id":"MDU6TGFiZWw5MTk3MTAwMTE=","url":"https://api.github.com/repos/rust-lang/rust/labels/disposition-merge","name":"disposition-merge","color":"008800","default":false},{"id":638321554,"node_id":"MDU6TGFiZWw2MzgzMjE1NTQ=","url":"https://api.github.com/repos/rust-lang/rust/labels/proposed-final-comment-period","name":"proposed-final-comment-period","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":32,"created_at":"2018-01-02T00:12:22Z","updated_at":"2018-06-01T13:36:44Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"This is inspired by ndarray and generally seems to allow llvm to remove more bounds checks in the code using the iterator (because the slices will always be exactly the requested size), and doesn't require the caller to add additional checks.\r\n\r\nA PR adding these for further discussion will come in a bit.\r\n\r\n- Implemented in #47126 \r\n\r\nOpen questions:\r\n- [ ] Should the new iterators panic if the slice is not divisible by the `chunk_size`, or omit any leftover elements.\r\nThe latter is implemented right now and very similar to how `zip` works and @shepmaster even [argues](https://github.com/rust-lang/rust/pull/47126#issuecomment-356709770) that without this, this iterator is kind of useless and the optimization should be implemented as part of the normal chunks iterator (which seems non-trivial, [see](https://github.com/rust-lang/rust/pull/47126#issuecomment-357423490) ).\r\nOmission of leftover elements is also how this iterator is implemented in [ndarray](https://docs.rs/ndarray/0.11.0/ndarray/struct.ArrayBase.html#method.exact_chunks) (but far more general)."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/393882762","html_url":"https://github.com/rust-lang/rust/issues/47115#issuecomment-393882762","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/47115","id":393882762,"node_id":"MDEyOklzc3VlQ29tbWVudDM5Mzg4Mjc2Mg==","user":{"login":"Kerollmops","id":3610253,"node_id":"MDQ6VXNlcjM2MTAyNTM=","avatar_url":"https://avatars0.githubusercontent.com/u/3610253?v=4","gravatar_id":"","url":"https://api.github.com/users/Kerollmops","html_url":"https://github.com/Kerollmops","followers_url":"https://api.github.com/users/Kerollmops/followers","following_url":"https://api.github.com/users/Kerollmops/following{/other_user}","gists_url":"https://api.github.com/users/Kerollmops/gists{/gist_id}","starred_url":"https://api.github.com/users/Kerollmops/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kerollmops/subscriptions","organizations_url":"https://api.github.com/users/Kerollmops/orgs","repos_url":"https://api.github.com/users/Kerollmops/repos","events_url":"https://api.github.com/users/Kerollmops/events{/privacy}","received_events_url":"https://api.github.com/users/Kerollmops/received_events","type":"User","site_admin":false},"created_at":"2018-06-01T13:36:44Z","updated_at":"2018-06-01T13:36:44Z","author_association":"NONE","body":"I agree, if someone needs the remaining part (the one that will never be iterated over) the only action to do is to reach the end of the `ExactChunks` iterator (i.e. by using `Iterator::last`) and call the `remaining` method.\r\n\r\nI prefer the behavior you are talking about ! It's more generic like you said !\r\n\r\nWhat is missing for that to be implemented ?"}}
{"actor":{"display_login":"Kerollmops"}}