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

RUBY_ENGINE Specific Suggestions? #13

Open
sshaw opened this issue Jul 5, 2015 · 9 comments
Open

RUBY_ENGINE Specific Suggestions? #13

sshaw opened this issue Jul 5, 2015 · 9 comments

Comments

@sshaw
Copy link

sshaw commented Jul 5, 2015

Hi, very nice program here :neckbeard: 👍. Just started using it and, being very familiar with the fast-ruby benchmarks, I thought that I would be nice to have RUBY_ENGINE specific suggestions.

I know you have your disclaimer -and certainly we should not blindly do whatever the machine tells us, but in the case of JRuby (maybe others) some of the suggestions are counterintuitive to what most people think is "fast ruby". Tailoring suggestions for the platform could be very helpful.

Thoughts?

@sshaw sshaw changed the title RUBY_PLATFORM Specific Suggestions? RUBY_ENGINE Specific Suggestions? Jul 5, 2015
@DamirSvrtan
Copy link
Owner

Thnx for the kind words. First of all, I'm not sure if this will work with JRuby :) DId you test it if it works? Since all the suggestions are from the fast-ruby, I would suggest that this is applied to that repo and than make the appropriate changes here. @JuanitoFatas what do you think?

@JuanitoFatas
Copy link

Sorry I'm not familiar with JRuby. What are your suggestions regarding RUBY_ENGINE? Could you submit your suggestion to fast-ruby? Thank you very much!

@sshaw
Copy link
Author

sshaw commented Jul 8, 2015

I'm not sure if this will work with JRuby :) DId you test it if it works?

Well, it "works", but it tells me to use a block instead of Symbol#to_proc and #each instead of a for loop; these are not faster in JRuby 1.7.19:

https://travis-ci.org/JuanitoFatas/fast-ruby/jobs/69644640#L259
https://travis-ci.org/JuanitoFatas/fast-ruby/jobs/69644640#L453

Since all the suggestions are from the fast-ruby, I would suggest that this is applied to that repo...

This is the right place.

The idea is that fasterer's suggestions would be based on RUBY_ENGINE and RUBY_VERSION, so that you don't tell JRuby or Rubinius or whatever users to do something that will actually make the code slower (of course, there's your disclaimer).

Hopefully the version/rules pairing can be generated automatically from Travis's benchmark-ips output. And the code modified to use a Chain-of-responsibility like pattern for rule resolution/lookup.

@DamirSvrtan
Copy link
Owner

This is the right place.

Ok, please invest some time in making the rules automatically generated from Travis output and create a pull request where we can see this. I'm up for making Fasterer work with JRuby and creating better and automatic support.

@sshaw
Copy link
Author

sshaw commented Jul 10, 2015

Having Travis drive the benchmarks is ideal, though my initial investigation shows that there may be issues.

benchmark-ips can output JSON and Travis' logs are available via their API. But... this assumes that:

  1. @JuanitoFatas changes output to JSON instead of benchmark-ips' default - the JSON would still have to be greped out from all the other log output. Not very nice. Don't think benchmark-ips can output JSON to stdout anyways so...
  2. Travis builds allow one to upload artifacts, which could then be used to build rules - sound good, sorta, but who owns the bucket?

Unless we have a bucket, sounds sketchy. Thoughts?

I'll continue to investigate.

@sshaw
Copy link
Author

sshaw commented Jul 10, 2015

Of course benchmark-ips text output could be extracted from the travis logs. Makes things easier on the config side, but may be fragile.

@sshaw
Copy link
Author

sshaw commented Jul 19, 2015

Okay, my conclusion is that's best to forget about using Travis CI and generate the rules file locally via rvm do or similar and a JSON or CSV export.

@DamirSvrtan
Copy link
Owner

Sorry, what's rvm do?

@sshaw
Copy link
Author

sshaw commented Aug 16, 2015

Sorry, what's rvm do?

It allows one to run a program against various ruby installations:

/tmp >rvm 2.2,1.7.19 do ruby -ve'p 1+1'
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin14]
2
jruby 1.7.19 (1.9.3p551) 2015-01-29 20786bd on Java HotSpot(TM) 64-Bit Server VM 1.8.0_11-b12 +jit [darwin-x86_64]
2

Here are the docs: https://rvm.io/set/do

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

No branches or pull requests

3 participants