# \#polyester

**URL:** https://discourse.julialang.org/tag/polyester/1069.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [SparseDiffTools - PolyesterForwardDiff Pre-allocation difficulties](https://discourse.julialang.org/t/sparsedifftools-polyesterforwarddiff-pre-allocation-difficulties/130292)

<div class="topic-metadata">

**Author:** [@cardoza2](https://discourse.julialang.org/u/cardoza2)\
**Replies:** 20\
**Last updated:** [July 8, 2025, 10:10am UTC](https://discourse.julialang.org/t/sparsedifftools-polyesterforwarddiff-pre-allocation-difficulties/130292 "2025-07-08T10:10:04Z")

</div>

I’m trying to pre-allocate a cache to be used with SparseDiffTools and PolyesterForwardDiff, but I’m struggling to get a working example. My attempt is based off of the jacobian tests: difftype = ADTypes.AutoSparse(ADT…

---

## [Is it possible to avoid these excess allocations when using @batch or @threads?](https://discourse.julialang.org/t/is-it-possible-to-avoid-these-excess-allocations-when-using-batch-or-threads/122208)

<div class="topic-metadata">

**Author:** [@Tetrakai](https://discourse.julialang.org/u/Tetrakai)\
**Replies:** 4\
**Last updated:** [November 8, 2024, 10:37am UTC](https://discourse.julialang.org/t/is-it-possible-to-avoid-these-excess-allocations-when-using-batch-or-threads/122208 "2024-11-08T10:37:37Z")

</div>

It took some effort to come up with a short MWE for this issue. The goal is to avoid a few small allocations when mutating (an argument of an inner function) in parallel: MWEusing BenchmarkTools, Parameters, Polyester, …

---

## [Maximum number of threads in Polyester.jl](https://discourse.julialang.org/t/maximum-number-of-threads-in-polyester-jl/115135)

<div class="topic-metadata">

**Author:** [@Lisette\_de\_Bruin](https://discourse.julialang.org/u/Lisette_de_Bruin)\
**Replies:** 1\
**Last updated:** [June 4, 2024, 8:35am UTC](https://discourse.julialang.org/t/maximum-number-of-threads-in-polyester-jl/115135 "2024-06-04T08:35:11Z")

</div>

Hi, I set the number of threads before I start up Julia by using the command: $env:JULIA\_NUM\_THREADS=16 before I start Julia. Then, I use the macro @batch from Polyester.jl, which evaluates a for-loop on multiple thread…

---

## [Nesting \`Threads.@thread\` and \`Polyester.@batch\` (or context manager to limit Polyester threads)](https://discourse.julialang.org/t/nesting-threads-thread-and-polyester-batch-or-context-manager-to-limit-polyester-threads/84490)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 7\
**Last updated:** [April 5, 2023, 7:07pm UTC](https://discourse.julialang.org/t/nesting-threads-thread-and-polyester-batch-or-context-manager-to-limit-polyester-threads/84490 "2023-04-05T19:07:02Z")

</div>

How dangerous is it to run Polyester.@batch inside of a Threads.@thread? An example where I might need this: a library implements a low level function that uses Polyester for multithreading, and I want to run multiple s…

---

## [Threading, Threads.@threads vs polyester.@batch vs LoopVectorization.@tturbo](https://discourse.julialang.org/t/threading-threads-threads-vs-polyester-batch-vs-loopvectorization-tturbo/84576)

<div class="topic-metadata">

**Author:** [@fft](https://discourse.julialang.org/u/fft)\
**Replies:** 4\
**Last updated:** [July 23, 2022, 2:28pm UTC](https://discourse.julialang.org/t/threading-threads-threads-vs-polyester-batch-vs-loopvectorization-tturbo/84576 "2022-07-23T14:28:25Z")

</div>

I’m trying to understand the multithreading options in julia. Seems that there are at least three options Threads.@threads, polyester.@batch, and LoopVectorization.@tturbo. Reading it sounds like @batch can be faster tha…

---

## [Interpreting \`JET\` warnings on a simple \`Polyester\` multithreaded loop](https://discourse.julialang.org/t/interpreting-jet-warnings-on-a-simple-polyester-multithreaded-loop/83681)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 7\
**Last updated:** [July 4, 2022, 3:12am UTC](https://discourse.julialang.org/t/interpreting-jet-warnings-on-a-simple-polyester-multithreaded-loop/83681 "2022-07-04T03:12:23Z")

</div>

Polyester seems to be one of the bigger sources of TTFX in some of my libraries. It is similarly the main source of warnings when using JET. Below is a very simple multi-threaded loop that causes a large number of JET wa…
