Skip to content

Instantly share code, notes, and snippets.

@cswiercz
Created January 25, 2016 00:17
Show Gist options
  • Save cswiercz/ad1a9f747e514bb235ad to your computer and use it in GitHub Desktop.
Save cswiercz/ad1a9f747e514bb235ad to your computer and use it in GitHub Desktop.
Some Puiseux timings
TIMING
addition:
1 loops, best of 1: 399 µs per loop
1 loops, best of 1: 50.8 µs per loop
multiplication
1 loops, best of 1: 382 µs per loop
1 loops, best of 1: 49.1 µs per loop
exponentiation
1 loops, best of 1: 63.9 µs per loop
1 loops, best of 1: 52 µs per loop
DONE
@cswiercz
Copy link
Author

timings2.out - Less coercion

 TIMING
addition:
1 loops, best of 1: 308 µs per loop
1 loops, best of 1: 47.9 µs per loop
multiplication
1 loops, best of 1: 230 µs per loop
1 loops, best of 1: 27.9 µs per loop
exponentiation
1 loops, best of 1: 36 µs per loop
1 loops, best of 1: 29.1 µs per loop
DONE

@cswiercz
Copy link
Author

timings0.out - Stupid me, I forgot to list the original timings with Sage's LaurentSeries patched to have a LaurentSeries.V() method similar to that of PowerSeries.

 TIMING
addition:
1 loops, best of 1: 648 µs per loop
1 loops, best of 1: 41 µs per loop
multiplication
1 loops, best of 1: 271 µs per loop
1 loops, best of 1: 37.9 µs per loop
exponentiation
1 loops, best of 1: 41 µs per loop
1 loops, best of 1: 32.2 µs per loop
DONE

Dang! I must have had a terrible implementation.

@cswiercz
Copy link
Author

timings3.out - Cythonized the valuation but not the power series

 TIMING
addition:
1 loops, best of 1: 275 µs per loop
1 loops, best of 1: 28.8 µs per loop
multiplication
1 loops, best of 1: 218 µs per loop
1 loops, best of 1: 26.9 µs per loop
exponentiation
1 loops, best of 1: 34.8 µs per loop
1 loops, best of 1: 27.9 µs per loop
DONE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment