#18346: Easier handling of vertex labels in graph backends
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  ncohen                 |       Status:  needs_review
           Type:         |    Milestone:  sage-6.7
  enhancement            |   Resolution:
       Priority:  major  |    Merged in:
      Component:  graph  |    Reviewers:
  theory                 |  Work issues:
       Keywords:         |       Commit:
        Authors:         |  d921cd9b951e14dcf7085788a254b213d3c40dfd
  Nathann Cohen          |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
  public/18346           |
   Dependencies:         |
-------------------------+-------------------------------------------------

Comment (by vdelecroix):

 Replying to [comment:14 ncohen]:
 > If this kind of cast from !Python/!Sage integer is really costly,
 perhaps we should have a cdef function that does it somewhere?

 That's a possibility, but it is not clear what should be the signature of
 the function. What if it fails?

 > Do I make a mistake if I say that you wrote this code in order to avoid
 having to raise an exception in many cases?

 It is not only that: calling directyl `mpz_get_si` or `PyInt_AS_LONG` is
 faster than the cast which does call `PyInt_AsLong`. But that's true that
 I do not like this `try/except`.

--
Ticket URL: <http://trac.sagemath.org/ticket/18346#comment:15>
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.

Reply via email to