# Execution time of Lua script in Defold is VERY high compared to execution through terminal

**URL:** <https://forum.defold.com/t/execution-time-of-lua-script-in-defold-is-very-high-compared-to-execution-through-terminal/75872>\
**Category:** Questions\
**Created:** [February 1, 2024, 10:56am UTC](https://forum.defold.com/t/execution-time-of-lua-script-in-defold-is-very-high-compared-to-execution-through-terminal/75872 "2024-02-01T10:56:58Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [February 2, 2024, 6:21am UTC](https://forum.defold.com/t/execution-time-of-lua-script-in-defold-is-very-high-compared-to-execution-through-terminal/75872/4 "2024-02-02T06:21:12Z")

</div>

It looks like it is the jit compilation which messes with the execution of that loop. Disable jit compilation and it is as fast as you’d expect:

```lua
if jit then jit.off() end
run_loop()
if jit then jit.on() end

```

---

_[View the full topic](https://forum.defold.com/t/execution-time-of-lua-script-in-defold-is-very-high-compared-to-execution-through-terminal/75872)._
