On Nov 30, 2008, at 12:37 , Martin Albrecht wrote:

>
>> Here's another example:
>> 64-bit:
>> sage: time a = random_matrix(ZZ,200).determinant()
>> CPU times: user 2.74 s, sys: 0.01 s, total: 2.75 s
>>
>> 32-bit:
>> sage: time a = random_matrix(ZZ,200).determinant()
>> CPU times: user 0.74 s, sys: 0.04 s, total: 0.78 s
>>
>> Here, surprisingly, 64-bit is WAY SLOWER than 32-bit at doing the
>> exact same thing.  I don't really understand this. The moral should I
>> think be that 32 versus 64 bit can be really subtle when it comes to
>> performance.
>
> It seems to me that this should be considered a bug. Or is a  
> convincing
> argument why it would run slower?

This is not, per se, a bug.  It may be a symptom of a bug, but that is  
pretty difficult to nail down, in general.

Among the issues that can affect running time for 32- vs. 64-bit code  
are the manipulation of larger objects (like libraries, memory  
space, ...).  These can sometimes be outside the domain of the program  
involved (i.e., in the OS).  With bigger address spaces, there's more  
memory to shuffle around.  The hardware architecture can have a  
significant effect on performance (width of path to memory, ...).   
Particularly on laptops, you will find that to fit within the cost  
budget, heat dissipation budget, weight budget, ..., all sorts of  
shortcuts are made which decrease performance compared to systems with  
better architectures.

There are tools to analyze system performance, but it takes some skill  
and a lot of practice to infer the causes of "low" performance like  
this.

Justin

--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Absorption of Federal Funds
--------
Men are from Earth.
Women are from Earth.
    Deal with it.
--------




--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@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-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to