From: Michal Suchanek Date: 2010-05-19T23:48:10+09:00 Subject: Re: 64 bit ruby interpreter On 19 May 2010 16:31, Michal Suchanek wrote: > On 19 May 2010 15:21, Bruno Sousa wrote: >> Ops :P >> >> Simone, did you noticed a performance improvement? >> > > I can say I noticed improvement in the amount of available memory. > > 32bit systems typically allow mapping only up to 2G of ram to a single process. > Also you will notice that 64bit systems can do integer arithmetics on larger range of numbers. If you did lots of integer calculations with numbers in the range 1073741824-2305843009213693952 you would notice a speed improvement I guess because fixnums are much faster than bignums. You would likely not notice a difference unless you need lots of memory or you do lots of integer math in the range which requires 30-62 bits to represent. n=1 ; (1..64).each { STDOUT << n << " " << n.class << "\n" ; n = n*2 } 1 Fixnum 2 Fixnum 4 Fixnum 8 Fixnum 16 Fixnum ... 268435456 Fixnum 536870912 Fixnum 1073741824 Bignum 2147483648 Bignum ... on a 32 bit system and 1 Fixnum 2 Fixnum 4 Fixnum 8 Fixnum 16 Fixnum ... 1152921504606846976 Fixnum 2305843009213693952 Fixnum 4611686018427387904 Bignum 9223372036854775808 Bignum on a 64bit system.