On Sep 9, 2009, at 11:18 PM, Robert Bradshaw wrote:
> > On Sep 9, 2009, at 10:38 PM, Bill Hart wrote: > >> This program only takes 0.68s in C using a pretty naive mpz >> program on >> sage.math. I doubt the memory allocation is really relevant. The >> interpreter overhead is by far the greatest component > > Not allocation of the mpz_t's themselves, but allocation of the > wrapping objects (or, even if there's a pool, the recycling of them). > Maybe you count this in interpreter overhead. > > There's also coercion overhead--a+b must verify a and b are both > integers before calling the integer add function. (I'd guess that's > less than 10-20%.) On this note, I think it's important to point out (if it wasn't obvious already) that this code is *designed* to measure overhead, as there is almost no actual arithmetic going on. - Robert --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to [email protected] To unsubscribe from this group, send an email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
