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 calling libc in druntime array append function #14910

Closed
wants to merge 3 commits into from

Conversation

ryuukk
Copy link
Contributor

@ryuukk ryuukk commented Feb 24, 2023

Context:

ldc-developers/ldc#4324

I don't know if that's the right place to do that, but i don't know what should be done, and none cared apparently when templating everything

@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @ryuukk! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#14910"

@dkorpel
Copy link
Contributor

dkorpel commented Feb 25, 2023

Superseded by #14912 (see ldc-developers/ldc#4324 (comment))

@dkorpel dkorpel closed this Feb 25, 2023
@ryuukk
Copy link
Contributor Author

ryuukk commented Feb 25, 2023

I think this PR is still valid, if we can reduce reliance on imports from libc, we move towards an easier to port runtime

@dkorpel
Copy link
Contributor

dkorpel commented Feb 25, 2023

memcpy has to be defined regardless, LDC's backend sometimes emits calls to it. Rolling an own implementation is also likely a performance regression, since memcpy is performance critical and optimized a lot.

@ryuukk
Copy link
Contributor Author

ryuukk commented May 14, 2023

memcpy has to be defined regardless, LDC's backend sometimes emits calls to it. Rolling an own implementation is also likely a performance regression, since memcpy is performance critical and optimized a lot.

compilers will optimize this anyways

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.

3 participants