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

Enable travis #7

Merged
merged 9 commits into from
Feb 19, 2015
Merged

Enable travis #7

merged 9 commits into from
Feb 19, 2015

Conversation

vmg
Copy link
Contributor

@vmg vmg commented Feb 18, 2015

Let's see if we can get this to build on as many platforms as possible.

cc @mislav

@mislav
Copy link
Contributor

mislav commented Feb 18, 2015

Nice! You're a miracle worker. Now it seems to fail on 1.8 only because I've used sample().

@mislav
Copy link
Contributor

mislav commented Feb 18, 2015

What prompted you to add the bang equivalents?

@vmg
Copy link
Contributor Author

vmg commented Feb 18, 2015

It occurred to me that sort! could be implemented very efficiently (and with less code), so I thought I would do just that and then implement sort by calling dup and sort! (this is how Array#sort! implemented in MRI and makes a lot of sense to me).

@mislav
Copy link
Contributor

mislav commented Feb 18, 2015

Sure. I can add tests for the new methods, no prob. I can also switch away from sample if you feel like you're done with this. You've already helped more than enough! 🙇

@vmg
Copy link
Contributor Author

vmg commented Feb 19, 2015

I'd rather remove 1.8.7 support, it's such a security risk! But if you're set on legacy support, feel free to fix the sample tests, I won't complain :))

@mislav
Copy link
Contributor

mislav commented Feb 19, 2015

If we would be able to remove a bunch of C code if we dropped support for 1.8, then I would be up for it. But if it's the same to us either way, then let's keep it since the previous version had it.

@vmg
Copy link
Contributor Author

vmg commented Feb 19, 2015

Nah, the code will remain the same. Go ahead and fix the tests then -- I think this is ready to work everywhere.

mislav and others added 8 commits February 19, 2015 18:14
Instead of using newer Array#sample, implement shuffling of an array manually.
I've picked the earliest test-unit version that doesn't define hoe as
runtime dependency.
It seems like recent C changes might have reduced the standard deviation
in `sort`, but not significantly, and it varied during runs:

    VersionSorter .sort
      Baseline: |                                                  X---------------|
      Current:  |                                                  X-----          |
                0                                                         744.500 us

    VersionSorter .rsort
      Baseline: |                                                          X-------|
      Current:  |                                                           X------|
                0                                                         642.000 us

Recording the new baseline just in case.
mislav added a commit that referenced this pull request Feb 19, 2015
@mislav mislav merged commit 2cd0122 into master Feb 19, 2015
@mislav mislav deleted the enable-travis branch February 19, 2015 11:32
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

Successfully merging this pull request may close these issues.

None yet

2 participants