--As off Wednesday, January 14, 2004 11:24 PM -0500, Daniel Staal is alleged to have said:

     my @a = unpack("C*", $a);
     my @b = unpack("C*", $b);

This can also be done with a: my @a = split //, $a; # (That is a null pattern.)

I'm not sure if split or unpack is faster, I'll have to benchmark
in the morning.

--As for the rest, it is mine.


Well, my benchmarking skills need work, since the numbers never come out the same twice. Suffice it to say, use whichever you feel is more clear: they seem to be about the same speed.

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to