[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8. Choosing between 32- and 64-bit builds

Many current CPUs have both 32- and 64-bit sets of instructions: this has long been true for UltraSparc and more recently for MIPS, PPC and `x86_64' (sometimes known as `amd64' and `Intel64' and earlier as `EM64T': practically all current `ix86' CPUs support this set of instructions). Most OSes running on such CPUs offer the choice of building a 32-bit or a 64-bit version of R (and details are given below under specific OSes). For most a 32-bit version is the default, but for some (e.g., `x86_64' Linux and (Mac) OS X >= 10.6) 64-bit is.

All current versions of R use 32-bit integers and IEC@tie{}60559(19) double-precision reals, and so compute to the same precision(20) and with the same limits on the sizes of numerical quantities. The principal difference is in the size of the pointers.

64-bit builds have both advantages and disadvantages:

So, for speed you may want to use a 32-bit build, but to handle large datasets (and perhaps large files) a 64-bit build. You can often build both and install them in the same place: See section Sub-architectures. (This is done in the OS X and Windows binary distributions.)

Even on 64-bit builds of R there are limits on the size of R objects (see help("Memory-limits"), some of which stem from the use of 32-bit integers (especially in FORTRAN code). On all builds of R, the maximum length (number of elements) of a vector is 2^{31-1, about 2 billion, and on 64-bit builds the size of a block of memory allocated is limited to 2^{34-1 bytes (8GB). It is anticipated these will be raised eventually(21) but the need for 8GB objects is (when this was written in 2011) exceptional.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by root on April, 26 2012 using texi2html 1.76.