Jeroen Demeyer
2018-12-02 00:56:56 UTC
This week I worked on the coercion model to make it faster. It turns out
that there was some margin for micro-optimizations. There are two
tickets in need of review: #26776 and #26790.
If you need to be convinced, run
sage: a = RR(25); b = ZZ(2)
sage: timeit('a+b', repeat=100, number=100000)
*Before*:
100000 loops, best of 100: 756 ns per loop
*After*:
100000 loops, best of 100: 636 ns per loop
This is a very nice gain for every single coercion(!) in Sage.
that there was some margin for micro-optimizations. There are two
tickets in need of review: #26776 and #26790.
If you need to be convinced, run
sage: a = RR(25); b = ZZ(2)
sage: timeit('a+b', repeat=100, number=100000)
*Before*:
100000 loops, best of 100: 756 ns per loop
*After*:
100000 loops, best of 100: 636 ns per loop
This is a very nice gain for every single coercion(!) in Sage.
--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+***@googlegroups.com.
To post to this group, send email to sage-***@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+***@googlegroups.com.
To post to this group, send email to sage-***@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.