Performance difference between Pharo 32bits and 64bits

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Performance difference between Pharo 32bits and 64bits

Thierry Goubier
Has anybody seen performance differences between the 32bits and the 64bits versions of Pharo 6 ?

I'm seeing a speedup greater than 2 on some intensive numerical code.

Note that, on that code, Pharo 64bits is slower than R, by around 30%. The code overall is memory bound.

Thierry


Reply | Threaded
Open this post in threaded view
|

Re: Performance difference between Pharo 32bits and 64bits

Clément Béra
Hi Thierry,

On the speed center you can compare 32 bits and 64 bits linux VMs: http://squeak.org/codespeed/

Normally Pharo 64 should be overall slightly slower than Pharo 32 because 70% of the memory is used for pointers, implying twice more data to process by the processor for pointer operations. Specific things, for example SmallFloat arithmetic, should however be faster on 64 bits.

For numerical code, benchs can be faster for two main reasons:
- the bench uses SmallFloat instead of BoxedFloat for most floats it uses in 64 bits
- the bench overflows the 31bits signed integer range for SmallIntegers, leading to the usage of LargeInteger in 32 bits, while it does not overflow the 61 bits signed integer range in 64 bits. This is typically the case for int32 benchs.

Other numerical benchs may be faster on 32 bits.


On Mon, Nov 14, 2016 at 4:04 PM, Thierry Goubier <[hidden email]> wrote:
Has anybody seen performance differences between the 32bits and the 64bits versions of Pharo 6 ?

I'm seeing a speedup greater than 2 on some intensive numerical code.

Note that, on that code, Pharo 64bits is slower than R, by around 30%. The code overall is memory bound.

Thierry



Reply | Threaded
Open this post in threaded view
|

Re: Performance difference between Pharo 32bits and 64bits

Thierry Goubier


2016-11-14 16:24 GMT+01:00 Clément Bera <[hidden email]>:
Hi Thierry,

On the speed center you can compare 32 bits and 64 bits linux VMs: http://squeak.org/codespeed/

Interesting to see the rsqueak results on that type of benchs. Mandelbrot would be the closest.
 

Normally Pharo 64 should be overall slightly slower than Pharo 32 because 70% of the memory is used for pointers, implying twice more data to process by the processor for pointer operations. Specific things, for example SmallFloat arithmetic, should however be faster on 64 bits.

Yes, then it is a lot faster.
 

For numerical code, benchs can be faster for two main reasons:
- the bench uses SmallFloat instead of BoxedFloat for most floats it uses in 64 bits
- the bench overflows the 31bits signed integer range for SmallIntegers, leading to the usage of LargeInteger in 32 bits, while it does not overflow the 61 bits signed integer range in 64 bits. This is typically the case for int32 benchs.

Other numerical benchs may be faster on 32 bits.


On Mon, Nov 14, 2016 at 4:04 PM, Thierry Goubier <[hidden email]> wrote:
Has anybody seen performance differences between the 32bits and the 64bits versions of Pharo 6 ?

I'm seeing a speedup greater than 2 on some intensive numerical code.

Note that, on that code, Pharo 64bits is slower than R, by around 30%. The code overall is memory bound.

Thierry




Thierry
Reply | Threaded
Open this post in threaded view
|

Re: Performance difference between Pharo 32bits and 64bits

Eliot Miranda-2
In reply to this post by Thierry Goubier
Hi Thierry,


> On Nov 14, 2016, at 7:04 AM, Thierry Goubier <[hidden email]> wrote:
>
> Has anybody seen performance differences between the 32bits and the 64bits versions of Pharo 6 ?
>
> I'm seeing a speedup greater than 2 on some intensive numerical code.
>
> Note that, on that code, Pharo 64bits is slower than R, by around 30%. The code overall is memory bound.

Can you post (a pointer to?) the R & Pharo code you're comparing?

TIA

>
> Thierry
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Performance difference between Pharo 32bits and 64bits

Thierry Goubier
Hi Eliot,

2016-11-14 16:57 GMT+01:00 Eliot Miranda <[hidden email]>:
Hi Thierry,


> On Nov 14, 2016, at 7:04 AM, Thierry Goubier <[hidden email]> wrote:
>
> Has anybody seen performance differences between the 32bits and the 64bits versions of Pharo 6 ?
>
> I'm seeing a speedup greater than 2 on some intensive numerical code.
>
> Note that, on that code, Pharo 64bits is slower than R, by around 30%. The code overall is memory bound.

Can you post (a pointer to?) the R & Pharo code you're comparing?

I join both. It's a simple open lid cavity two dimensions lattice boltzmann code (D2Q9).

The Pharo code is a very simple transcription, I didn't try to optimize it at all (I'm not entirely sure it gives the right results, I'll check that tomorrow).

Those benchs are the result of the MACH project, an ITEA project, where, with a partner, we wrote a compiler for the R code that is 50 times faster than R (on a dual core i3) (and can use gpus, reaching speedups greater than 1000).

Regards,

Thierry
 

TIA

>
> Thierry
>
>



LatticeBoltzmann-ThierryGoubier.1.mcz (5K) Download Attachment
LBM.r (3K) Download Attachment