Giter Club home page Giter Club logo

Comments (5)

BlueRaja avatar BlueRaja commented on May 17, 2024

Then you'd need to access FastPriorityQueue through PriorityQueueNode: PriorityQueueNode.FastPriorityQueue. Yuck.

_numNodesEverEnqueued is to keep the queue stable, which is necessary in some pathfinding algorithms.

from high-speed-priority-queue-for-c-sharp.

ferralverrall avatar ferralverrall commented on May 17, 2024

That's what usings are for =) Though I agree, not great, but neither is having public variables that if touched by an outsider, will break the priorityqueue. (Though I could see that being the doctor my elbow hurts problem -- ie, don't do that and everything's fine)

Interesting tidbit about the _numNodesEver thing, which algorithms use it? For my purposes I'm tossing it, downgrading insertionindex to an uint, and priority to a float -- which reminds me do you have a set of performance tests? I'm curious how much I gain (if any) by making the QueueNode smaller, for greater cache coherence. I'm also curious whether there is any speed difference moving to structs.

from high-speed-priority-queue-for-c-sharp.

BlueRaja avatar BlueRaja commented on May 17, 2024

A stable priority queue is necessary for any algorithm that requires movement to behave in a consistent manner. The example that comes immediately to mind is pathery.com, where ex. if moving both 'up' and 'right' give the same distance, up is always taken.

Though, I suppose I could add a compiler flag (or just create a new PriorityQueue class, StablePriorityQueue, and make the main one non-stable)

from high-speed-priority-queue-for-c-sharp.

BlueRaja avatar BlueRaja commented on May 17, 2024

(whoops, forgot to answer your other question) - Yes I have a lot of performance tests, but they are a part of the private project this priority queue originally stemmed from.

They are tests of actual pathfinding algorithms (BFS, A*, and LPA*) against various real-world small- and medium-sized mazes.

from high-speed-priority-queue-for-c-sharp.

BlueRaja avatar BlueRaja commented on May 17, 2024

I'm going to close this as I'm not going to implement the main suggestion; but I've created #7 for the other suggestion.

from high-speed-priority-queue-for-c-sharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.