Skip to content

Commit

Permalink
Proof performance tips for clarity (JuliaLang#45862)
Browse files Browse the repository at this point in the history
  • Loading branch information
LilithHafner authored and Francesco Fucci committed Aug 11, 2022
1 parent 7c4e5cc commit 571be3d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions doc/src/manual/performance-tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -1048,11 +1048,10 @@ julia> @time f.(x);

That is, `fdot(x)` is ten times faster and allocates 1/6 the
memory of `f(x)`, because each `*` and `+` operation in `f(x)` allocates
a new temporary array and executes in a separate loop. (Of course,
if you just do `f.(x)` then it is as fast as `fdot(x)` in this
example, but in many contexts it is more convenient to just sprinkle
some dots in your expressions rather than defining a separate function
for each vectorized operation.)
a new temporary array and executes in a separate loop. In this example
`f.(x)` is as fast as `fdot(x)` but in many contexts it is more
convenient to sprinkle some dots in your expressions than to
define a separate function for each vectorized operation.

## [Consider using views for slices](@id man-performance-views)

Expand Down

0 comments on commit 571be3d

Please sign in to comment.