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

v1.0 Omnibus #10

Merged
merged 17 commits into from
Aug 17, 2020
Merged

v1.0 Omnibus #10

merged 17 commits into from
Aug 17, 2020

Conversation

emilypi
Copy link
Member

@emilypi emilypi commented Jun 16, 2020

See title. This PR does the following:

  • Improves performance by 3-4x for encode, 4-5x for decode.
  • Gets rid of that wonky decode signature returning the tuple and actually returns an error message with offset. The signature will now be ByteString -> Either String ByteString.
  • Actually tests using the test vectors defined in the RFC, and uses property tests to ensure invariants hold.
  • Adds lenient decoders to the API
  • Add -XTrustworthy annotations to the relevant exposed modules
  • Rewrites the haddocks to be more up to date and fancy-styled.
  • Adds benchmarks to the .cabal file so they can be run at toplevel, and make them better.
  • Bumps the Cabal version to 1.12

This is a major API overhaul and cause lots of breakages. Consequently, I suggest we bump to version 1.0.0.0.

@emilypi emilypi marked this pull request as ready for review June 16, 2020 18:45

c2w :: Char -> Word8
c2w = fromIntegral . ord
{-# INLINE c2w #-}
Copy link
Member Author

@emilypi emilypi Jun 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unsafeShiftR and c2w are for GHC <= 7.4

@emilypi emilypi changed the title Overhaul this old-ass API and make it go FAST v1.0 Omnibus Jun 16, 2020
- 4.5x decode, 3.5x encode performance
- A change to the decode api model
- Lenient decoders
- RFC 4648-compliant tests
- Property tests
- Better haddocks + since annotations
- Update cabal file to include benches + bump versions
@emilypi emilypi mentioned this pull request Jun 17, 2020
@emilypi emilypi requested review from 23Skidoo and hvr June 17, 2020 14:56
@emilypi emilypi merged commit 2317ff9 into haskell:master Aug 17, 2020
@emilypi emilypi deleted the v1.0-overhaul branch September 18, 2020 06:18
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.

1 participant