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

Avoid unnecessary heap allocation of SLICE objects #542

Merged
merged 1 commit into from
Oct 25, 2016

Conversation

wlevine
Copy link

@wlevine wlevine commented Sep 4, 2016

This partly fixes #541. Here are the results of Lokesh's benchmark with the patch:

       user     system      total        real
Matrix getter  1.960000   0.000000   1.960000 (  1.961916)
NMatrix getter  1.570000   0.000000   1.570000 (  1.583510)
Matrix setter  1.680000   0.000000   1.680000 (  1.688569)
NMatrix setter  3.070000   0.000000   3.070000 (  3.077533)

#[] is probably fast enough now. #[]= is a lot faster than before, but may still need more work.

@MohawkJohn I think this is the right way to do this, but I'd appreciate it if you take a look.

@v0dro
Copy link
Member

v0dro commented Sep 7, 2016

Why are the tests failing?

@translunar
Copy link
Member

@v0dro Looks like the failures relate to #522 and #538, or at least resemble those. I can't see how any of @wlevine's changes would have caused this, though — can you?

Copy link
Member

@translunar translunar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like a second pair of eyes on the Travis failures, but am okay with merging after that happens.

@v0dro
Copy link
Member

v0dro commented Sep 22, 2016

@MohawkJohn I think you're right. Those other bugs will need fixing for the build to pass.

@translunar translunar mentioned this pull request Oct 12, 2016
@translunar
Copy link
Member

@wlevine Can you please rebase against master? I think we've fixed the Travis problems.

@wlevine
Copy link
Author

wlevine commented Oct 24, 2016

@MohawkJohn Done!

@translunar translunar merged commit f53cd76 into SciRuby:master Oct 25, 2016
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.

NMatrix getter and setter way slower than Matrix
3 participants