Coder Social home page Coder Social logo

Comments (2)

wqking avatar wqking commented on May 20, 2024

Can you give a use case? I'm not sure how that's useful.
Currently you can either call processOne up to max_size times, or use processIf and in the condition func, max_size is checked. However, note that processIf will still loop through all items in the queue even if the condition func returns false.

from eventpp.

mattygiedt avatar mattygiedt commented on May 20, 2024

Sure -- use case is handling large amounts of market data. I've found it more performant to vectorize (batch) the consumption of data on the 'other side' of your queue data structure. This allows you to efficiently understand book state in multiple update scenarios, and, if you're re-publishing that data, you can optimize the writing. (ie. zeromq::sndmore)

However, taking a closer look at process() I'm frankly not sure this would gain much as you would still need the for(auto & item : tempList) and somehow build the event array from each unique event type, and then dispatch that.

Appreciate the work you've done here!

from eventpp.

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.