# How to know if a value type includes heap allocations and ref counting

**URL:** <https://forums.swift.org/t/how-to-know-if-a-value-type-includes-heap-allocations-and-ref-counting/72919>\
**Category:** Using Swift\
**Tags:** performance, arc, allocation\
**Created:** [July 3, 2024, 3:54pm UTC](https://forums.swift.org/t/how-to-know-if-a-value-type-includes-heap-allocations-and-ref-counting/72919 "2024-07-03T15:54:44Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![Karl](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@Karl](https://forums.swift.org/u/Karl)\
**Post date:** [July 4, 2024, 9:23pm UTC](https://forums.swift.org/t/how-to-know-if-a-value-type-includes-heap-allocations-and-ref-counting/72919/15 "2024-07-04T21:23:53Z")

</div>

I guess you're kind of getting in to realm of [performance annotations](https://forums.swift.org/t/performance-annotations/54441).

I think there are still quite a few open questions around it, but it's important for some kinds of programs to commit to particular performance characteristics. I believe it's still something we all want to happen in some form.

I don't know if we could quantify it - to give you something in the middle between "any allocations" (the default) and `@_noAllocations`, but it's an interesting thing to consider.

---

_[View the full topic](https://forums.swift.org/t/how-to-know-if-a-value-type-includes-heap-allocations-and-ref-counting/72919)._
