#16296: Speed improvements for categories with axioms
-------------------------------------+-------------------------------------
Reporter: SimonKing | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: sage-6.3
Component: categories | Resolution:
Keywords: cython | Merged in:
performance categories | Reviewers:
Authors: | Work issues:
Report Upstream: N/A | Commit:
Branch: | 2ca07873a91cf6d5e685ed3527a314944a8fdfb9
u/SimonKing/ticket/16296 | Stopgaps:
Dependencies: #10963, #15801, |
#16309 |
-------------------------------------+-------------------------------------
Comment (by SimonKing):
Just for the record: The following is faster than `uncamelcase`.
{{{
#!python
cpdef inline default_match_splitter(match):
cdef str g = match.group()
return g[0]+'_'+g[1]
camel_splitter = re.compile("[a-z][A-Z]")
def new_uncamelcase(s, separator=None):
if separator is None:
return camel_splitter.sub(default_match_splitter, s).lower()
return camel_splitter.sub(lambda match:
match.group()[0]+separator+match.group()[1], s).lower()
}}}
However, since `uncamelcase` is rarely called, I will leave it.
--
Ticket URL: <http://trac.sagemath.org/ticket/16296#comment:27>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.