in reply to Re^2: I know two prints are slower than one, but 200x slower?!?!? (==)
in thread I know two prints are slower than one, but 200x slower?!?!?

I think there's a function on recent versions of Scalar::Util, that returns the proper, unoverloaded reference, for use in Inside Out Objects for example.

I guess it must be refaddr that is used for this.

  • Comment on Re^3: I know two prints are slower than one, but 200x slower?!?!? (==)

Replies are listed 'Best First'.
Re^4: I know two prints are slower than one, but 200x slower?!?!? (refaddr)
by tye (Sage) on Aug 16, 2007 at 20:50 UTC

    Indeed, overload says:

    overload::StrVal(arg)
    Gives string value of arg as in absence of stringify overloading. If you are using this to get the address of a reference (useful for checking if two references point to the same thing) then you may be better off using Scalar::Util::refaddr(), which is faster.

    - tye