1 | initial version |
Can you be more explicit with the code you are timing? What calculation involving f
and g
takes 1 second w/o fast_callable
? I get similar timing for both functions at $z = 4 + 2I$.
sage: z = var('z')
sage: f = fast_callable(exp(z).abs(),domain=CDF,vars='z')
sage: g = fast_callable(exp(z.real()), domain=CDF, vars='z')
sage: f(4+2*I)
54.5981500331
sage: g(4+2*I)
54.5981500331
sage: timeit('f(4+2*I)')
625 loops, best of 3: 592 µs per loop
sage: timeit('g(4+2*I)')
625 loops, best of 3: 595 µs per loop