Opened 10 years ago

Last modified 10 years ago

#12808 closed enhancement

Optimize ClassCallMetaClass using Cython — at Initial Version

Reported by: hivert Owned by: jason
Priority: major Milestone: sage-5.1
Component: misc Keywords: classcall UniqueRepresentation
Cc: nthiery, SimonKing Merged in:
Authors: Florent Hivert Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


When a class C is an instance of ClasscallMetaclass, then for any constructor call, the system currently looks for __classcall__ and __classcall_private__ in C. This adds quite an overhead and this could be cached, assuming no one modifies C (which seems reasonable). Improving this speeds up, in particular, all call to the constructor of a subclass of UniqueRepresentation, eg. many parents, all categories...

Change History (0)

Note: See TracTickets for help on using tickets.