Skip to content

Commit cecde6b

Browse files
Update code_optimization.md
1 parent 4ac3c21 commit cecde6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/src/tutorials/code_optimization.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function f(du, u, p)
7171
end
7272
7373
prob = NLS.NonlinearProblem(f, u0, p)
74-
@benchmark sol = NLS.solve(prob, NLS.NewtonRaphson())
74+
BenchmarkTools.@benchmark sol = NLS.solve(prob, NLS.NewtonRaphson())
7575
```
7676

7777
Notice how much faster this already runs! We can make this code even simpler by using
@@ -83,7 +83,7 @@ function f(du, u, p)
8383
return nothing
8484
end
8585
86-
@benchmark sol = NLS.solve(prob, NLS.NewtonRaphson())
86+
BenchmarkTools.@benchmark sol = NLS.solve(prob, NLS.NewtonRaphson())
8787
```
8888

8989
## Further Optimizations for Small Nonlinear Solves with Static Arrays and SimpleNonlinearSolve

0 commit comments

Comments
 (0)