This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/2051] New: Use _stp_map_sortn()


See http://sourceware.org/bugzilla/show_bug.cgi?id=1379 comment 4

In a polling loop, we generally don't need or want to print out an entire sorted
array. sortn() just finds the top or bottom n elements. In a typical array of
1000 elements, sortn(10) runs in less than a tenth the time that sort() takes.
Plus, if the array is not cleared, sortn() will have to do little work and the
speed advantage will become even larger. 

Sorts are expensive and lock maps for a long time. So reducing the time the
sorts take will improve accuracy by reducing the number of drops caused by
attempted locks on maps failing.

-- 
           Summary: Use _stp_map_sortn()
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: minor
          Priority: P3
         Component: translator
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: hunt at redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=2051

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]