# @debug has massive performance impact on Windows

**URL:** <https://discourse.julialang.org/t/debug-has-massive-performance-impact-on-windows/103974>\
**Category:** Performance\
**Created:** [September 18, 2023, 9:53am UTC](https://discourse.julialang.org/t/debug-has-massive-performance-impact-on-windows/103974 "2023-09-18T09:53:57Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [September 18, 2023, 1:50pm UTC](https://discourse.julialang.org/t/debug-has-massive-performance-impact-on-windows/103974/18 "2023-09-18T13:50:10Z")

</div>

The difference is that on Windows, accessing the environment seems to allocate:

```julia
julia> f() = get(ENV, "JULIA_DEBUG", "")
f (generic function with 1 method)

julia> @btime f(); # Linux
  26.734 ns (0 allocations: 0 bytes)

julia> @btime f(); # Windows
  112.293 ns (2 allocations: 112 bytes)

```

---

_[View the full topic](https://discourse.julialang.org/t/debug-has-massive-performance-impact-on-windows/103974)._
