Coder Social home page Coder Social logo

release 2 about iterum HOT 4 CLOSED

xgbuils avatar xgbuils commented on July 21, 2024
release 2

from iterum.

Comments (4)

xgbuils avatar xgbuils commented on July 21, 2024

I created a new package iterarray with a tiny API (slice & nth) to achieve better performance with sliced iterables, caching values and taking advantage of performance when iterables that are passed are indexables.

I going to use iterarray as a dependency of iterum to bring better performance and simplify some methods.

from iterum.

benji6 avatar benji6 commented on July 21, 2024

If possible are you able to collect some benchmarks on the new approach using iterarray?

I've been thinking about performance a lot in imlazy and am pretty stoked that it seems to be running faster than native array methods now in node 8! I decided against a caching approach though because in theory a user should be able to pull from an infinite iterable without ever having to worry about memory running out... What if they want to take some values from an infinite iterable every time an event occurs and the code is running for a long time on a tiny node machine? Will it fall over eventually? It's something of a niche use-case but naive caching does introduce that risk... Would be good to see what perf gains you make with it though

from iterum.

xgbuils avatar xgbuils commented on July 21, 2024

Hi @benji6!

It sounds good. I will collect some benchmarks on the last 1.x version and 2.0 version to contrast that.

My idea of iterarray package is:

  • to have nth(n) with O(1) amortized cost (the first call with O(n) cost, the next calls with O(1))
  • to keep .slice with O(1) cost
  • to traverse slice(m, n) with O(m - n) amortized cost (the first time with O(n) and the next times with O(n - m)).

But certainly, achieving this can produce memory issues. I should think on this.

Thanks so much!

from iterum.

benji6 avatar benji6 commented on July 21, 2024

No worries, really interesting to see what you're getting up to here!

from iterum.

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.