#4495: [with patch, positive review] weight distribution for binary codes
---------------------------+------------------------------------------------
 Reporter:  rlm            |        Owner:  rlm     
     Type:  defect         |       Status:  new     
 Priority:  major          |    Milestone:  sage-3.4
Component:  coding theory  |   Resolution:          
 Keywords:                 |  
---------------------------+------------------------------------------------
Comment (by mabshoff):

 Replying to [comment:6 wdj]:

 Hi David,

 > This is a great patch. It applies cleanly and I've done lots of testing,
 which it passes.
 >
 > I have a question though and this is what the Wall time on the following
 test means?

 Fixing the formatting:

 {{{
  for i in range(20):
      C = RandomLinearCode(100, 25, GF(2))
      time s1 = C.spectrum()
      time s2 = C.spectrum(method="gap")
      s1 == s2
 }}}
 The timings:
 {{{
  Time: CPU 0.84 s, Wall: 0.84 s
  Time: CPU 0.94 s, Wall: 5.05 s
  True
  Time: CPU 0.87 s, Wall: 0.90 s
  Time: CPU 1.05 s, Wall: 4.99 s
  True
  Time: CPU 0.87 s, Wall: 0.90 s
  Time: CPU 0.95 s, Wall: 4.94 s
  True
  Time: CPU 0.84 s, Wall: 0.86 s
  Time: CPU 0.96 s, Wall: 4.96 s
  True
  Time: CPU 0.88 s, Wall: 0.88 s
  Time: CPU 0.98 s, Wall: 4.98 s
  True
  Time: CPU 0.85 s, Wall: 0.85 s
  Time: CPU 0.92 s, Wall: 4.69 s
  True
  Time: CPU 0.85 s, Wall: 0.86 s
  Time: CPU 0.84 s, Wall: 4.76 s
  True
  Time: CPU 0.84 s, Wall: 0.84 s
  Time: CPU 0.98 s, Wall: 5.01 s
  True
  Time: CPU 0.85 s, Wall: 0.85 s
  Time: CPU 0.94 s, Wall: 4.97 s
  True
  Time: CPU 0.88 s, Wall: 0.89 s
  Time: CPU 0.94 s, Wall: 4.95 s
  True
  Time: CPU 0.85 s, Wall: 0.86 s
  Time: CPU 0.93 s, Wall: 4.99 s
  True
  Time: CPU 0.85 s, Wall: 0.85 s
  Time: CPU 1.00 s, Wall: 4.93 s
  True
  Time: CPU 0.93 s, Wall: 0.95 s
  Time: CPU 1.03 s, Wall: 4.97 s
  True
  Time: CPU 0.85 s, Wall: 0.85 s
  Time: CPU 1.04 s, Wall: 4.92 s
  True
  Time: CPU 0.84 s, Wall: 0.85 s
  Time: CPU 1.02 s, Wall: 5.00 s
  True
  Time: CPU 0.86 s, Wall: 0.87 s
  Time: CPU 0.85 s, Wall: 4.66 s
  True
  Time: CPU 0.85 s, Wall: 0.86 s
  Time: CPU 0.83 s, Wall: 4.59 s
  True
  Time: CPU 0.85 s, Wall: 0.85 s
  Time: CPU 0.86 s, Wall: 4.75 s
  True
  Time: CPU 0.91 s, Wall: 0.91 s
  Time: CPU 0.90 s, Wall: 4.73 s
  True
  Time: CPU 0.91 s, Wall: 0.92 s
  Time: CPU 0.88 s, Wall: 4.71 s
  True
 }}]

 >
 > I wonder if this means that GAP's kernel computation (method="gap" is
 the slowest of the three)

 What three? I see only two computations.

 > beats binary some percentage of the time but GAP's interface takes a
 long
 > time to parse that information back to Sage (via pexpect and whatever
 > fiddling GAP does), as indicated by the Wall time?

 That means the new code is beating the pants off GAP+Guava:
 {{{
  Time: CPU 0.91 s, Wall: 0.92 s
  Time: CPU 0.88 s, Wall: 4.71 s
 }}}

 What counts it the total time, i.e. about 0.92s vs. 4.71s. The first line
 tells us that the new code spends all its time in Sage while the second
 line tells us that 4.71-0.88=3.83s were spend in GAP. I assume if we pick
 larger examples the favor will shift toward Robert's implementation, but
 that needs to be tested. One aspect here might be that the pexpect
 transfer to and from GAP is inefficient, but that can also easily be
 determined.

 Cheers,

 Michael

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4495#comment:7>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to