#19337: Improve asteroidal triples code
-------------------------------------+-------------------------------------
       Reporter:  dcoudert           |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.9
      Component:  graph theory       |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  David Coudert      |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/dcoudert/asteroid                |  e32015d13649c7df56362fc9fd2b57937f465705
   Dependencies:  #19334             |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by ncohen):

 > Why should this graph code use a type of at least 32 bits? Where does
 the arbitrary number 32 come from? Why not `int_fast16_t` or
 `int_fast64_t` then?

 I did not check this specific code but uint32_t probably comes from the
 data structure "static_sparse_graph", which uses them.

 Then, as David said, this algorithm does not need uint32_t -- it would not
 run. The 31 bits of int32_t would do, and 16 bits would probably be
 sufficient.

 > Really, why that? I would say that you should always use types like
 `long` unless you need a specific bit-length.

 Here we want to specify the bit length, because the smallest the type is
 the better it will be cached.  We will read memory very very often in that
 code.

 Nathann

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