Re: [julia-users] Checking for boxing

2016-01-21 Thread Jameson
Yichao is correct. The `box` intrinsic isn't particularly well named and has a bit of an identity crisis -- if it throws an error, it calls itself `reinterpret`, which is closer to it's real purpose, which is to change the declared type of some bits. On Thursday, January 14, 2016 at 8:26:39 PM

Re: [julia-users] Checking for boxing

2016-01-14 Thread Yichao Yu
On Thu, Jan 14, 2016 at 7:48 PM, Spencer Russell wrote: > Is there a way to check for whether values are getting boxed/unboxed short > of looking at the llvm code? As an example, here’s a simple function that I > wouldn’t expect to need any boxes: > > julia> function

[julia-users] Checking for boxing

2016-01-14 Thread Spencer Russell
Is there a way to check for whether values are getting boxed/unboxed short of looking at the llvm code? As an example, here’s a simple function that I wouldn’t expect to need any boxes: julia> function isnullptr{T}(x::Ptr{T}) x == Ptr{T}(0) end isnullptr (generic function with 1