Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: SyncUnionIterator #54

Closed
wants to merge 2 commits into from

Conversation

jeswr
Copy link
Collaborator

@jeswr jeswr commented Mar 27, 2022

Resolves #52

Creates an 8x perf improvement with 800ms to run the following vs 100ms to run with the SyncUnionIterator.

const it = new UnionIterator([range(0, 2_000_000), range(0, 2_000_000)]);

const start = Date.now();

it.on('data', () => {})
.on('end', () => {
  const end = Date.now();
  console.log(end - start)
})

@RubenVerborgh @jacoscaz This is a draft and the following decisions need to be made on it:

  • Should UnionIterator just be replaced with SyncUnionIterators (I think it should)
  • If not, which should union use

This is a draft because I am yet to write a test suite for this

@jeswr jeswr marked this pull request as draft March 27, 2022 04:29
@coveralls
Copy link

Coverage Status

Coverage decreased (-3.6%) to 96.365% when pulling 50b7797 on jeswr:feat/sync-unioniterator into 358608f on RubenVerborgh:main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

optimization: Implement UnionIterator without buffering
2 participants