Giter Club home page Giter Club logo

Comments (6)

BlueRaja avatar BlueRaja commented on May 17, 2024

Hmm. This is a good idea, but I'm not sure how it could be implemented without completely rewriting SimplePriorityQueue. I don't want to add it to FastPriorityQueue too because of the performance hit. I'll have to think about it.

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

zijianhuang avatar zijianhuang commented on May 17, 2024

I have just done those required by @goldenbull at https://github.com/zijianhuang/High-Speed-Priority-Queue-for-C-Sharp

now Priority could be generic, while backward compatibility with current HEAD in origin is kept.

When more stress tests are done, I will create a pull request.

Meanwhile, you @goldenbull may just use my fork in which currently the default Priority type is double. And I don't think you need to use DateTime for priority, since you could use DateTime.ToOATime().

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

goldenbull avatar goldenbull commented on May 17, 2024

@zijianhuang there is no ToOATime method in C# DateTime struct, I guess you meant to say ToOADate :)
There is still data loss because I have some high frequence data which needs the precision to 1us

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

goldenbull avatar goldenbull commented on May 17, 2024

@BlueRaja yes, this will make a big change from the base of the whole building, I'm not sure if it's neccessary.
Nevertheless, for my special case, I can modify several lines and change the float type to long in hard-code way. Glories to BlueRaja :)

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

BlueRaja avatar BlueRaja commented on May 17, 2024

Completed in version 4.0. The new declaration for SimplePriorityQueue is SimplePriorityQueue<TItem, TPriority>

Generics won't be added to FastPriorityQueue - I found they cause a ~5% slowdown. If someone really needs a generic version and SimplePriorityQueue is too slow, there is an undocumented class named GenericPriorityQueue<TItem, TPriority> which they can use.

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

goldenbull avatar goldenbull commented on May 17, 2024

👍

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.