# Benchmarking a function with side effects

**URL:** https://discourse.julialang.org/t/benchmarking-a-function-with-side-effects/48531
**Category:** General Usage
**Tags:** benchmark, benchmarktools
**Created:** [October 17, 2020, 3:56am UTC](https://discourse.julialang.org/t/benchmarking-a-function-with-side-effects/48531 "2020-10-17T03:56:40Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)
#### Post date: [October 17, 2020, 4:59am UTC](https://discourse.julialang.org/t/benchmarking-a-function-with-side-effects/48531/3 "2020-10-17T04:59:52Z")

</div>

Also `evals=1` to avoid repeatedly pushing to the same array (ref: [How to benchmark append!? - #7 by rdeits](https://discourse.julialang.org/t/how-to-benchmark-append/47272/7) )

---

_[View the full topic](https://discourse.julialang.org/t/benchmarking-a-function-with-side-effects/48531)._
