# \`Nulls.skip\` is very slow

**URL:** https://discourse.julialang.org/t/nulls-skip-is-very-slow/6351
**Category:** Data
**Created:** [October 9, 2017, 4:43pm UTC](https://discourse.julialang.org/t/nulls-skip-is-very-slow/6351 "2017-10-09T16:43:33Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![nalimilan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nalimilan/32/147_2.png) [@nalimilan](https://discourse.julialang.org/u/nalimilan)
#### Post date: [October 9, 2017, 5:05pm UTC](https://discourse.julialang.org/t/nulls-skip-is-very-slow/6351/2 "2017-10-09T17:05:33Z")

</div>

Thanks for reporting this. I think that’s a case where the optimizations for `Union{T, Null}` have not been fully implemented in Julia 0.7 yet. Specifically, inlining of `next` does not happen (see [this explanation](https://discourse.julialang.org/t/small-union-types-present-and-future-looking-for-some-guidelines/6320/2) by @quinnj), which kills performance for such a simpler iterator object.

However, Julia 0.7 is about twice faster than Julia 0.6 in my tests, so that’s already a good sign (of course that’s not acceptable). Until optimizations have landed, better continue to use DataArrays, which are going to be ported to Nulls soon so that the ecosystem becomes more consistent.

We should definitely add a few test cases like this to Nulls using PkgBenchmark (or even in Base, as this is a common pattern).

---

_[View the full topic](https://discourse.julialang.org/t/nulls-skip-is-very-slow/6351)._
