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

Change example in "Copying data is not always bad" section of Performance Tips #45865

Merged
merged 1 commit into from
Jun 30, 2022

Conversation

LilithHafner
Copy link
Member

The previous example shows only a minor speedup for copying, and further, I could not reproduce that speedup at all when copying the example into a 1.7 or a 1.9 REPL. I couldn't find any example where copying the data sped up operation unless it was accessed repeatedly. Consequently, I changed the example to one with repeated access, and changed the prose to reflect the significance of repeated access. This makes sense to me because it seems difficult to recoup the cost of irregular access during a copy by avoiding a single irregular access during operation.

Repeated multiplication is silly because it makes more sense to raise A to a power first, so I added a ReLU activation function and made the example into a full neural network. It's the simplest sensible example I could come up with.

@LilithHafner LilithHafner added the domain:docs This change adds or pertains to documentation label Jun 29, 2022
@KristofferC KristofferC merged commit aa5b57e into JuliaLang:master Jun 30, 2022
@LilithHafner LilithHafner deleted the patch-5 branch June 30, 2022 13:36
pcjentsch pushed a commit to pcjentsch/julia that referenced this pull request Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants