#11332: 65x penalty in performance for using float instead of RealNumber
---------------------------+------------------------------------------------
Reporter: pang | Owner: tbd
Type: defect | Status: new
Priority: major | Milestone: sage-4.7.1
Component: performance | Keywords: float, RealNumber
Work_issues: | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies:
---------------------------+------------------------------------------------
The function random() returns a "float", but 1.0*random() is a
"RealNumber". The following code:
{{{
%time
#1
N=5000
x=random()
for c in xrange(N):
kk = exp(x)
}}}
takes 5.24 seconds, while
{{{
%time
#1
N=5000
x=random()*1.0
for c in xrange(N):
kk = exp(x)
}}}
takes 0.08
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11332>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.