64 bit ruby interpreter

B

Bruno Sousa

Since when does 64bit ruby interpreter exists?
Last year I didn't find those. Were they recently developed?
 
S

Simone D'Amico

It was 64 bit since you have the possibility to build it from source :)

Simone D'Amico

Il giorno 19/mag/2010, alle ore 03.34, Bruno Sousa
 
B

Bruno Sousa

Ops :p

Simone, did you noticed a performance improvement?

regards

Simone D'Amico wrote:\
 
M

Michal Suchanek

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.

Thanks

Michal
 
M

Michal Suchanek

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.
 
C

Caleb Clausen

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.

Integer math on even larger integers should be roughly twice as fast too.

You should also notice that your processes now use somewhat more
memory, principally because all pointers are now twice as large.

Also, most things (besides large integer math) will be a little bit
slower; many memory operations are now performed on words that are
twice as large and it takes twice as long to move the data in and out
of memory.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,156
Messages
2,570,878
Members
47,404
Latest member
PerryRutt

Latest Threads

Top