Opened 11 years ago
Closed 9 years ago
#10834 closed enhancement (fixed)
faster creation of an ETuple from a list or tuple
Reported by: | pernici | Owned by: | AlexGhitza |
---|---|---|---|
Priority: | major | Milestone: | sage-5.8 |
Component: | algebra | Keywords: | days45 |
Cc: | Merged in: | sage-5.8.beta0 | |
Authors: | Mario Pernici | Reviewers: | Travis Scrimshaw |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
faster creation of an ETuple from a list or tuple
Attachments (1)
Change History (6)
Changed 11 years ago by
comment:1 Changed 11 years ago by
comment:2 Changed 9 years ago by
- Reviewers set to Travis Scrimshaw
- Status changed from new to needs_review
I believe this patch is ready for review so I'm marking it as such, and I'm starting the review for it.
comment:3 Changed 9 years ago by
- Keywords days45 added
- Status changed from needs_review to positive_review
Looks good to me.
Before patch (running 5.7.beta3
):
sage: %timeit ETuple([5,2,2,1]) 100000 loops, best of 3: 6.4 us per loop sage: %timeit ETuple([5,2,2,1]*20) 10000 loops, best of 3: 54.8 us per loop sage: L = [5,2,2,1]*10000 sage: %timeit ETuple(L) 10 loops, best of 3: 26 ms per loop sage: %timeit ETuple(L) 10 loops, best of 3: 24.2 ms per loop
After patch:
sage: %timeit ETuple([5,2,2,1]) 100000 loops, best of 3: 3.1 us per loop sage: %timeit ETuple([5,2,2,1]*20) 10000 loops, best of 3: 26.9 us per loop sage: L = [5,2,2,1]*10000 sage: %timeit ETuple(L) 100 loops, best of 3: 5.97 ms per loop sage: %timeit ETuple(L) 100 loops, best of 3: 6.23 ms per loop
comment:4 Changed 9 years ago by
- Milestone changed from sage-5.7 to sage-5.8
comment:5 Changed 9 years ago by
- Merged in set to sage-5.8.beta0
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
With trac_10834_etuple.patch the creation of an ETuple from a list or tuple is faster
main is Sage-4.6 unpatched; run with processor Intel Core i7 2.80GHz
The
multi_polynomial_libsingular exponent
method becomes faster; here is a benchmark taken from ticket #7587