For example: if I want to push a struct or object items with a variable of interest (e.g. double time value). What we need is to read the minimum time items and pop the minimum time object from the queue efficiently.
That article draws a conclusion for its own cases one can consider (finding that for more than 64 ints, binary search was faster). If it is that time-critical, maybe it should be tested for one’s specific use case… I would only be speculating, but others may have a better idea.
Hi Guys,
Thanks for the comments.
I know about the std priority queue. But my code currently using Urho Vector, So I can use them in Lua script without making any change or adding effort to this feature.
Thanks,
I think it would be also good to also have the MinHeap.
I think Urho3D events feature would be more benefit if there is also a min heap.
For example a server based event framework game will execute all earlier events (e.g. distributed events in order to the clients.). This behaviour may be more efficient than sorting of list of events.