oopplz has asked for the wisdom of the Perl Monks concerning the following question:

What are the advantages\disadvantages of 64 bit perl?
Does it even exist?

Replies are listed 'Best First'.
Re: 64 bit perl
by northwind (Hermit) on Jun 01, 2005 at 11:27 UTC

    Yes it exists, I just got done building an installation on a Sun box.  For the full story, please heed the advice of the previous post and read the INSTALL file that should have come with the perl source.  Some advantages are you get to address greater than 2GB of memory and the 255 max open file-handles barrier goes away.  The disadvantages these pose are if you create a module that depends on these (or other 64 bit exclusive features) people who are running 32 bit will curse you when they try using your module.

Re: 64 bit perl
by ambrus (Abbot) on Jun 01, 2005 at 09:37 UTC

    In the INSTALL file, there is a subsection called 64 bit support. Other than that, there's no evidence that it exists.

Re: 64 bit perl
by perrin (Chancellor) on Jun 01, 2005 at 19:24 UTC
    It allows you turn your old Nintendo 64 boxes into a powerful web cluster! The OO API for Legend of Zelda is awesome too.
Re: 64 bit perl
by Zaxo (Archbishop) on Jun 01, 2005 at 23:41 UTC

    $ perl -v This is perl, v5.9.2 built for i686-linux-thread-multi-64int-ld Copyright 1987-2005, Larry Wall ( . . . ) $ perl -e'print 1<<63,$/' 9223372036854775808 $
    I built that for testing.

    After Compline,
    Zaxo

      2147483648 * 2 = 4294967296
      9223372036854775808 = 2^64

      s0o on a 32-bit machine it prints 2147483648

      I understand

      1 << 63; # returns 2^64

      But how is $/ effecting it?
      Is it slurping in the highest possible value, and if it cannot get the whole thing it breaks it into pieces?

        $/ is just a newline by default. It's there to break the line and set the next shell prompt back to the far left of the screen.

        On 32-bit perl,

        $ perl -e'print 1<<$_, $/ for 28..36' 268435456 536870912 1073741824 2147483648 1 2 4 8 16 $
        Perl 1<<$n is equivalent to 2**$n, not 2**($n+1). The << operator is regarded as bitwise by perl, so forces the result into a bitfield, an unsigned int. As in C, an overflowed int wraps to its low bits[What was I thinking there?]. On 64-bit perl, the above gives,
        $ perl -e'print 1<<$_, $/ for 28..36' 268435456 536870912 1073741824 2147483648 4294967296 8589934592 17179869184 34359738368 68719476736 $
        For both 32- and 64-bit Perl, 1<<64 == 1.

        After Compline,
        Zaxo

        $/ is just adding a newline to the end of the print statement.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
        "Science is about questioning the status quo. Questioning authority".
        The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.