On Jun 9, 2008, at 1:19 PM, mabshoff wrote:

>
>
>
> On Jun 9, 10:05 am, David Harvey <[EMAIL PROTECTED]> wrote:
>> Hi,
>
> Hi David,
>
>> This is on an 8-core 2GHz xeon running debian. (Tom Boothby's  
>> machine.)
>>
>> In a clean build of sage-3.0.2:
>>
>> sage: time x = bernoulli(40000)
>> CPU times: user 4.19 s, sys: 0.01 s, total: 4.20 s
>> Wall time: 4.20 s
>> sage: time x = bernoulli(40000)
>> CPU times: user 3.18 s, sys: 0.01 s, total: 3.18 s
>> Wall time: 3.19 s
>> sage: time x = bernoulli(40000)
>> CPU times: user 3.18 s, sys: 0.00 s, total: 3.19 s
>> Wall time: 3.19 s
>> sage: time x = bernoulli(40000)
>> CPU times: user 3.18 s, sys: 0.00 s, total: 3.19 s
>> Wall time: 3.19 s
>>
>> Then I tried building my own PARI/GP. I first built gmp 4.2.1 with
>> jason martin's core 2 patches. Then I built pari/gp. I get:
>>
>> ? #
>>     timer = 1 (on)
>> ? x = bernfrac(40000);
>> time = 1,972 ms.
>> ? x = bernfrac(40000);
>> time = 1,317 ms.
>> ? x = bernfrac(40000);
>> time = 1,316 ms.
>> ? x = bernfrac(40000);
>> time = 1,316 ms.
>>
>> Why is the sage version three times slower than the gp version?
>
> No clue. Can you actually compare the gp binary from Sage directly
> with the timings from your self builid binary to eliminate the problem
> that libPari is involved here? If the gp binary in Sage is slower by a
> factor of three compared to the one you build this sounds like a bug
> to me. But it could also be conversation overhead for example.

With sage -gp, I get something *in between*:

? x = bernfrac(40000);
time = 3,272 ms.
? x = bernfrac(40000);
time = 2,260 ms.
? x = bernfrac(40000);
time = 2,260 ms.

The banner printout is exactly the same for both gp builds:

                           GP/PARI CALCULATOR Version 2.3.3 (released)
                  amd64 running linux (x86-64/GMP-4.2.1 kernel) 64- 
bit version
            compiled: Jun  9 2008, gcc-4.1.2 20061115 (prerelease)  
(Debian 4.1.1-21)
                        (readline v5.2 enabled, extended help available)

except that my standalone build says "readline not compiled in".

david


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to