Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract libcore benchmarks to a separate crate #39484

Closed
phungleson opened this issue Feb 3, 2017 · 5 comments
Closed

Extract libcore benchmarks to a separate crate #39484

phungleson opened this issue Feb 3, 2017 · 5 comments

Comments

@phungleson
Copy link
Contributor

When looking though libcore I saw this

image

https://github.com/rust-lang/rust/blob/master/src/libcore/Cargo.toml#L16-L19

So just want to check if the task is about:

  1. Create libcorebench in src
  2. Move all #[bench] from libcoretest to libcorebench like this one

https://github.com/rust-lang/rust/blob/master/src/libcoretest/any.rs#L128

If it is I can give it a try, thanks

@alexcrichton
Copy link
Member

@phungleson yeah that should do the trick! I think that you can avoid a whole new directory even, but could have something like src/libcore/bench/*.rs and then that could get pulled in the Cargo.toml

@ghost
Copy link

ghost commented Feb 4, 2017

The same thing applies to libcollections, too: benchmarks should be moved into libcollectionsbench (or libcollections/bench).

frewsxcv added a commit to frewsxcv/rust that referenced this issue Feb 5, 2017
…hton

Extract libcore benchmarks to a separate folder

Fix rust-lang#39484

r? @alexcrichton since you seem to know about this :)

Thanks!
@est31
Copy link
Member

est31 commented Feb 5, 2017

I've recently been wondering what the reason behind that was. Any ideas? Any links to previous discussion?

frewsxcv added a commit to frewsxcv/rust that referenced this issue Feb 5, 2017
…hton

Extract libcore benchmarks to a separate folder

Fix rust-lang#39484

r? @alexcrichton since you seem to know about this :)

Thanks!
frewsxcv added a commit to frewsxcv/rust that referenced this issue Feb 5, 2017
…hton

Extract libcore benchmarks to a separate folder

Fix rust-lang#39484

r? @alexcrichton since you seem to know about this :)

Thanks!
@alexcrichton
Copy link
Member

@est31 in general compiling libcore with --test literally is a huge PITA because there's so many intermixed types. The "foreign" libcore (one linked by libtest) duplicates the local libcore (the one being compiled with --test) and it's very difficult to keep the types straight, especially for standard traits.

It ended up being easier to do everything out of the library

@est31
Copy link
Member

est31 commented Feb 5, 2017

@alexcrichton thanks!

frewsxcv added a commit to frewsxcv/rust that referenced this issue Feb 7, 2017
…lexcrichton

Extract collections benchmarks to libcollections/bench

Good suggestion from @stjepang rust-lang#39484 (comment)

r? @alexcrichton
frewsxcv added a commit to frewsxcv/rust that referenced this issue Feb 7, 2017
…lexcrichton

Extract collections benchmarks to libcollections/bench

Good suggestion from @stjepang rust-lang#39484 (comment)

r? @alexcrichton
frewsxcv added a commit to frewsxcv/rust that referenced this issue Feb 8, 2017
…lexcrichton

Extract collections benchmarks to libcollections/bench

Good suggestion from @stjepang rust-lang#39484 (comment)

r? @alexcrichton
frewsxcv added a commit to frewsxcv/rust that referenced this issue Feb 8, 2017
…lexcrichton

Extract collections benchmarks to libcollections/bench

Good suggestion from @stjepang rust-lang#39484 (comment)

r? @alexcrichton
frewsxcv added a commit to frewsxcv/rust that referenced this issue Feb 8, 2017
…lexcrichton

Extract collections benchmarks to libcollections/bench

Good suggestion from @stjepang rust-lang#39484 (comment)

r? @alexcrichton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants