Arithmetic in RR is slower than arithmetic with native C types. If you
use RDF instead of RR, Sage will be faster than numpy, especially if you
use methods instead of global functions:
sage: import numpy as np
sage: np1 = np.float64('1'); RR1 = 1.0; RDF1 = RDF(1)
sage: timeit('np.sin(np1)', number=10000, repeat=20)
10000 loops, best of 20: 812 ns per loop
sage: timeit('sin(RR1)', number=10000, repeat=20)
10000 loops, best of 20: 3.85 µs per loop
sage: timeit('sin(RDF1)', number=10000, repeat=20)
10000 loops, best of 20: 620 ns per loop
sage: timeit('RDF1.sin()', number=10000, repeat=20)
10000 loops, best of 20: 151 ns per loop
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.