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

Issue 1031 unionBySorted API #1415

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Conversation

rnjtranjan
Copy link
Collaborator

No description provided.

@harendra-kumar
Copy link
Member

Please rebase on master and add a benchmark.

@rnjtranjan rnjtranjan changed the base branch from issue_1031_intersectBySorted to master February 10, 2022 12:25
@harendra-kumar
Copy link
Member

Can you rebase it against master, there are two things to do in this PR currently:

  1. It includes the intersectBySorted change, this change has been included in master, it has to be dropped while rebasing
  2. A benchmark should be added, so that we can check the performance and fix

streamly.cabal Outdated Show resolved Hide resolved
@harendra-kumar
Copy link
Member

Benchmarks are failing with:

All.Unicode.Stream/o-1-space.decode-encode.encodeUtf8 . parseMany parseCharUtf8 (1/10):   +RTS -T -K36K -M16M    -RTS      
Using small input file: benchmark-tmp/in-10MB.txt
Using big input file: benchmark-tmp/in-100MB.txt
Using output file: benchmark-tmp/out.txt
All
  Unicode.Stream/o-1-space
    decode-encode
      encodeUtf8 . parseMany parseCharUtf8 (1/10): FAIL
        Exception: Streamly.Internal.Data.Stream.parseCharUtf8WithD:Not enough input
        CallStack (from HasCallStack):
          error, called at src/Streamly/Internal/Unicode/Stream.hs:498:17 in streamly-0.8.2-inplace:Streamly.Internal.Unicode.Stream

1 out of 1 tests failed (0.20s)
Error: Benchmark execution failed.
Error: Benchmark execution failed.
Error: Process completed with exit code 1.

@rnjtranjan
Copy link
Collaborator Author

Not sure why the benchmark is failing, in my local env I re-ran without any issue:
kaveri:~/composewell/issue_1031_Jan0522/streamly  (issue_1031_unionBySorted)$ (nix:streamly) cabal run bench:Unicode.Stream
Up to date
Using small input file: benchmark-tmp/in-10MB.txt
Using big input file: benchmark-tmp/in-100MB.txt
Using output file: benchmark-tmp/out.txt
All
Unicode.Stream/o-1-space
ungroup-group
unlines . splitOnSuffix ([Word8]) (1/10): OK (1.74s)
560 ms ± 11 ms
interposeSuffix . splitOnSuffix (Array Word8) (1/10): OK (1.95s)
628 ms ± 3.2 ms
UnicodeArr.unlines . UnicodeArr.lines (Array Char) (1/10): OK (2.07s)
666 ms ± 4.5 ms
interposeSuffix . wordsBy ([Word8]) (1/10): OK (1.25s)
393 ms ± 2.8 ms
unwords . wordsBy ([Char]) (1/10): OK (1.64s)
525 ms ± 4.2 ms
UnicodeArr.unwords . UnicodeArr.words (Array Char) (1/10): OK (1.63s)
530 ms ± 7.0 ms
decode-encode/toChunks
encodeUtf8' . decodeUtf8Arrays (1/10): OK (2.48s)
786 ms ± 3.4 ms
decode-encode
encodeLatin1' . decodeLatin1: OK (9.84s)
3.073 s ± 9.2 ms
encodeLatin1 . decodeLatin1: OK (10.01s)
3.082 s ± 15 ms
encodeUtf8 . parseMany parseCharUtf8 (1/10): OK (3.78s)
1.228 s ± 13 ms
encodeUtf8 . decodeUtf8 (1/10): OK (3.37s)
1.060 s ± 4.3 ms

All 11 tests passed (39.90s)

@harendra-kumar harendra-kumar marked this pull request as draft July 5, 2023 17:28
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.

None yet

2 participants