in reply to Re: Re: Marking an array as already seen (yes)
in thread Marking an array as already seen

Just a tiny bit faster, but really "simpler" might have been a better description. It won't get confused if someone (re)blesses the array, for example. It will (probably, as I said) be slightly faster because it doesn't even have to look up blessedness and put that into the string and it will use a shorter string. *shrug*

It was a quick note I added at the end. I prefer 0+$ref over "$ref" in general. But the speed isn't really the point. Just not doing extra work that might get in the way.

                - tye
  • Comment on Re^3: Marking an array as already seen (yes)

Replies are listed 'Best First'.
Re^4: Marking an array as already seen (yes)
by adrianh (Chancellor) on Jan 18, 2003 at 12:39 UTC

    Scalar::Util's refaddr (assuming the XS version) is slightly faster still, and doesn't suffer from possible problems with overloaded objects :-)