Opened 12 years ago

Closed 5 years ago

#4984 closed enhancement (fixed)

Clean up __getitem__ for matrices once Cython is smarter

Reported by: craigcitro Owned by: was
Priority: minor Milestone: sage-duplicate/invalid/wontfix
Component: linear algebra Keywords:
Cc: Merged in:
Authors: Reviewers: Jeroen Demeyer
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:


So we currently use several Python/C API calls to speed up the __getitem__ method in sage/matrix/matrix0.pyx. In particular, we do several typechecks against standard Python types, and replacing generic PY_TYPE_CHECK calls with specific Python/C API calls (like PySlice_Check) provides a significant speedup. Once Cython can do all these things for us, we should clean up __getitem__ so that it's more readable/portable.

Alternatively, if such functionality still doesn't exist in Cython, one should feel free to go, implement that functionality, get it merged, create a new Cython spkg, and then make these changes. :)

Change History (4)

comment:1 Changed 12 years ago by AlexGhitza

  • Type changed from defect to enhancement

comment:2 Changed 5 years ago by jdemeyer

  • Milestone changed from sage-wishlist to sage-duplicate/invalid/wontfix
  • Report Upstream set to N/A
  • Reviewers set to Jeroen Demeyer
  • Status changed from new to needs_review

PY_TYPE_CHECK is gone.

comment:3 Changed 5 years ago by jdemeyer

  • Status changed from needs_review to positive_review

comment:4 Changed 5 years ago by vbraun

  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.