# Discrete event simulation framework for discrete time

**URL:** <https://discourse.julialang.org/t/discrete-event-simulation-framework-for-discrete-time/55436>\
**Category:** Performance\
**Tags:** question\
**Created:** [February 17, 2021, 2:48am UTC](https://discourse.julialang.org/t/discrete-event-simulation-framework-for-discrete-time/55436 "2021-02-17T02:48:30Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Skoffer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/skoffer/32/378_2.png) [@Skoffer](https://discourse.julialang.org/u/Skoffer)\
**Post date:** [March 19, 2021, 8:56am UTC](https://discourse.julialang.org/t/discrete-event-simulation-framework-for-discrete-time/55436/5 "2021-03-19T08:56:57Z")

</div>

I’ve made a comparison not long ago: [Performance disadvantages of structs? - #12 by Skoffer](https://discourse.julialang.org/t/performance-disadvantages-of-structs/57397/12)

Generally if you do everything correctly then immutable structures should work faster than mutable. If you see the opposite, usually it’s some non-idiomatic usage.

And of course, this distinction immutable/mutable only applies to small objects (like `Agent` in your examples). If you have hundreds of agents, they should be contained in mutable Vector/Matrix, because that’s what Vector is for.

---

_[View the full topic](https://discourse.julialang.org/t/discrete-event-simulation-framework-for-discrete-time/55436)._
