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

[tiny performance fix] Array that are not coerced, creating a copy is unnecessary. #1121

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

amehra-ni
Copy link
Contributor

What does this Pull Request accomplish?

For data types in an array that are not coerced, creating a copy is unnecessary. We can efficiently utilize the existing data within our structure.

Why should this Pull Request be merged?

  • Instead of allocating a new array and transferring the data, we can pass a pointer directly to the existing data.
  • Updated mako accordingly as we don't need an else condition now, hence moved the status check before the if.

What testing has been done?

The APIs have been tested, and they function as expected, maintaining the same behavior as before.

@amehra-ni amehra-ni marked this pull request as ready for review November 18, 2024 11:45
@amehra-ni amehra-ni merged commit b5a65e5 into main Nov 18, 2024
8 of 10 checks passed
@amehra-ni amehra-ni deleted the users/amehra/remove-extra-copy branch November 18, 2024 19:51
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.

4 participants