in reply to (OT) Re^9: Snarky comments on the ddj perl quiz (hijack, pvnv memory)
in thread Snarky comments on the ddj perl quiz

Both store both the integer and character value. But one uses a 4-byte string buffer and one (for reasons unknown to me, but perhaps related to the longest conceivable stringification of a floating point number) uses a 36-byte string buffer.
  • Comment on Re^10: Snarky comments on the ddj perl quiz (hijack, pvnv memory)

Replies are listed 'Best First'.
Re^11: Snarky comments on the ddj perl quiz (hijack, pvnv memory)
by Argel (Prior) on Aug 31, 2007 at 15:52 UTC
    Ahh, I see. In the first example the length is known because "1.1" is a constant so storing it can be optimized while in the second example "$x" to evaluated at runtime.