Skip to content

Instantly share code, notes, and snippets.

@cswiercz
Created July 29, 2014 18:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cswiercz/3e3ff6d68d03fc52d7a0 to your computer and use it in GitHub Desktop.
Save cswiercz/3e3ff6d68d03fc52d7a0 to your computer and use it in GitHub Desktop.
abelfunctions Issue #45 - Puiseux and Intbasis Performance with Caching
[cswiercz@jude abelfunctions] python abelfunctions/integralbasis.py
Tue Jul 29 10:37:15 2014 intbasis.profile
4005669 function calls (3810399 primitive calls) in 11.217 seconds
Ordered by: internal time
List reduced from 1296 to 10 due to restriction <10>
ncalls tottime percall cumtime percall filename:lineno(function)
133971/68128 1.254 0.000 6.858 0.000 cache.py:78(wrapper)
527918 0.466 0.000 0.466 0.000 {isinstance}
192986 0.445 0.000 1.305 0.000 numbers.py:1708(__hash__)
208828 0.417 0.000 0.559 0.000 numbers.py:400(__hash__)
207118 0.373 0.000 0.927 0.000 numbers.py:1395(__hash__)
27580/27245 0.359 0.000 0.604 0.000 basic.py:333(__eq__)
6302/1304 0.313 0.000 3.275 0.003 simplify.py:2451(powsimp)
138863/137251 0.282 0.000 0.681 0.000 sympify.py:52(sympify)
350204/343890 0.264 0.000 0.308 0.000 basic.py:100(__hash__)
84 0.237 0.003 0.299 0.004 identification.py:17(pslq)
Tue Jul 29 10:37:15 2014 intbasis.profile
4005669 function calls (3810399 primitive calls) in 11.217 seconds
Ordered by: cumulative time
List reduced from 1296 to 10 due to restriction <10>
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 11.335 11.335 integralbasis.py:171(integral_basis)
1 0.000 0.000 11.271 11.271 integralbasis.py:223(_integral_basis_monic)
3 0.003 0.001 7.760 2.587 integralbasis.py:251(compute_bd)
133971/68128 1.254 0.000 6.858 0.000 cache.py:78(wrapper)
100 0.001 0.000 6.819 0.068 integralbasis.py:354(__getitem__)
44 0.001 0.000 6.817 0.155 integralbasis.py:356(__missing__)
44 0.002 0.000 6.816 0.155 integralbasis.py:362(evaluate_integral_basis_element)
296 0.030 0.000 6.809 0.023 puiseux.py:1317(__mul__)
142 0.001 0.000 5.935 0.042 expr.py:2437(<genexpr>)
282/142 0.001 0.000 5.883 0.041 expr.py:2486(yield_lseries)
Tue Jul 29 10:37:15 2014 intbasis.profile
4005669 function calls (3810399 primitive calls) in 11.217 seconds
Ordered by: call count
List reduced from 1296 to 10 due to restriction <10>
ncalls tottime percall cumtime percall filename:lineno(function)
527918 0.466 0.000 0.466 0.000 {isinstance}
350204/343890 0.264 0.000 0.308 0.000 basic.py:100(__hash__)
208828 0.417 0.000 0.559 0.000 numbers.py:400(__hash__)
207118 0.373 0.000 0.927 0.000 numbers.py:1395(__hash__)
192986 0.445 0.000 1.305 0.000 numbers.py:1708(__hash__)
138863/137251 0.282 0.000 0.681 0.000 sympify.py:52(sympify)
133971/68128 1.254 0.000 6.858 0.000 cache.py:78(wrapper)
111159 0.183 0.000 0.183 0.000 {hasattr}
102255 0.058 0.000 0.058 0.000 basic.py:700(args)
97336 0.041 0.000 0.041 0.000 {method 'append' of 'list' objects}
⎡ 2 ⎛ 3 ⎞ ⎤
⎢ y - 1 -⎝x⋅y - 4⋅y + 3⋅y⎠ ⎥
⎢1, y, ──────, ────────────────────⎥
⎢ x - 1 2 ⎥
⎣ 4⋅x - 4⋅x ⎦
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment