# Reference to Objects Very Slow

**URL:** <https://discourse.julialang.org/t/reference-to-objects-very-slow/963>\
**Category:** New to Julia\
**Created:** [December 15, 2016, 2:29am UTC](https://discourse.julialang.org/t/reference-to-objects-very-slow/963 "2016-12-15T02:29:33Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)\
**Post date:** [December 15, 2016, 2:38am UTC](https://discourse.julialang.org/t/reference-to-objects-very-slow/963/2 "2016-12-15T02:38:45Z")

</div>

What are you trying to do? `Foo` is already a mutable type so there’s no need to put it in a `Ref`.

`Ref` is an abstract type so you’ll get terrible performance when using it as the type of a slot.

> [@Ian\_Watson](#):
>
> is this the right way to dereference a Ref

No. There’s no way to dereference a `Ref` in a generic way. For `Base.RefValue`, use `ref[]`.

---

_[View the full topic](https://discourse.julialang.org/t/reference-to-objects-very-slow/963)._
