# Use of \`pointer\`

**URL:** https://discourse.julialang.org/t/use-of-pointer/8849
**Category:** General Usage
**Created:** [February 2, 2018, 1:58pm UTC](https://discourse.julialang.org/t/use-of-pointer/8849 "2018-02-02T13:58:59Z")
**Posts on this page:** 1
**Showing post:** 11

<div class="post-metadata">

### Author: ![jameson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jameson/32/23_2.png) [@jameson](https://discourse.julialang.org/u/jameson)
#### Post date: [February 5, 2018, 8:25pm UTC](https://discourse.julialang.org/t/use-of-pointer/8849/11 "2018-02-05T20:25:50Z")

</div>

> [@A plea for int overflow checking as the default](https://discourse.julialang.org/t/a-plea-for-int-overflow-checking-as-the-default/3338/73):
>
> Can you give some concrete examples of that?

I’m not sure what you mean. Julia defines that `pointer` / `pointer_from_objref` returns an invalid Ptr for use from Julia (it can be used from C, although implicit conversion via ccall or Ref should generally be better / easier), and that `unsafe_load` / `unsafe_store` are unaligned operations that cannot operate on Julia objects (it’s undefined behavior if they alias in any way). So it’s not entirely just a question of how they benchmark, it’s simply that we define that the compiler may just ignore both if you intermix them (similar to how turning on TBAA in C can break non-standards-compliant code).

> [@A plea for int overflow checking as the default](https://discourse.julialang.org/t/a-plea-for-int-overflow-checking-as-the-default/3338/73):
>
> The current Julia SIMD support does not handle loops where you have to stop early, or conditionally execute some code depending on what is found when checking the chunk

My recollection is that SIMD doesn’t usually handle early-exit, so compiler authors haven’t put much effort into trying to sort out which cases might be feasible to handle. LLVM may handle vectorizing conditional execution if it can turn it into a `select` operation or can identify an applicable sufflevector or mask – this seems to be rather difficult for it however, as I’ve mostly only observed it succeeding on fairly simple cases.

---

_[View the full topic](https://discourse.julialang.org/t/use-of-pointer/8849)._
