[gmpi] Re: 3.8. Events Req 25 eventorder

>What's cheaper:
A - maintaining a sorted queue or,
B - inserting events unsorted, and sorting after?

If the events are generally generated in order, then A

If there are less than 20 events per timeslice, then A

If there are more than 20 events, and they are generated in
random order, then B.

( from "Numerical Recipies in C" )

So i guess it depends.  That's why I figured having the host
presenting the events pre-sorted was a good idea.  That way
you (the host coder) can do either A or B.

Jeff

----------------------------------------------------------------------
Generalized Music Plugin Interface (GMPI) public discussion list
Participation in this list is contingent upon your abiding by the
following rules:  Please stay on topic.  You are responsible for your own
words.  Please respect your fellow subscribers.  Please do not
redistribute anyone else's words without their permission.

Archive: http://www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe

Other related posts: