# Invokelatest() makes code run slower

**URL:** <https://discourse.julialang.org/t/invokelatest-makes-code-run-slower/6027>\
**Category:** Internals & Design\
**Created:** [September 21, 2017, 3:44pm UTC](https://discourse.julialang.org/t/invokelatest-makes-code-run-slower/6027 "2017-09-21T15:44:58Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [September 21, 2017, 3:46pm UTC](https://discourse.julialang.org/t/invokelatest-makes-code-run-slower/6027/2 "2017-09-21T15:46:54Z")

</div>

> [@"running in world age X, while current world is Y" errors](https://discourse.julialang.org/t/running-in-world-age-x-while-current-world-is-y-errors/5871/4):
>
> No, simply defining the same function twice wouldn’t cause this — you can try it by modifying the task example I have above. In your case, the problem is likely the same as the simpler example in the documentation: [Redefining Methods](https://docs.julialang.org/en/stable/manual/methods/#Redefining-Methods-1). You’re evaluating code and defining new methods and then trying to call those new methods, but the code that is doing that is still frozen in the old world from when it started running. Yes, invokelatest is definitely slower. It has to emit very pessimized …

---

_[View the full topic](https://discourse.julialang.org/t/invokelatest-makes-code-run-slower/6027)._
