Giter Site home page Giter Site logo

k-bx / blaze-builder Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lpsmith/blaze-builder

0.0 3.0 0.0 1.67 MB

Efficient serialization of Haskell values to lazy bytestrings with a large average chunk size.

Home Page: http://jaspervdj.be/blaze

License: Other

Haskell 96.13% Makefile 1.80% C 0.28% Roff 1.79%

blaze-builder's Introduction

blaze-builder

Continuous Integration status Hackage page (downloads and API reference)

This library allows to efficiently serialize Haskell values to lazy bytestrings with a large average chunk size. The large average chunk size allows to make good use of cache prefetching in later processing steps (e.g. compression) and reduces the system call overhead when writing the resulting lazy bytestring to a file or sending it over the network.

This library was inspired by the module Data.Binary.Builder provided by the binary package. It was originally developed with the specific needs of the blaze-html package in mind. Since then it has been restructured to serve as a drop-in replacement for Data.Binary.Builder, which it improves upon both in speed as well as expressivity.

To see the improvements in speed, run the throughput benchmark, which measures serialization speeds for writing Word8, Word16, Word32 and Word64 in different endian formats and different chunk sizes, using the command

make bench-throughput

or run the list serialization comparison benchmark

make bench-blaze-vs-binary

Checkout the combinators in the module "Blaze.ByteString.Builder.Write" to see the improvements in expressivity. This module allows to incorporate efficient primitive buffer manipulations as parts of a builder. We use this facility in the 'blaze-html' HTML templating library to allow for the efficient serialization of HTML escaped and UTF-8 encoded characters.

blaze-builder's People

Contributors

23skidoo avatar bgamari avatar ggreif avatar gregwebs avatar jaspervdj avatar juhp avatar k-bx avatar kini avatar lpsmith avatar meiersi avatar mightybyte avatar nomeata avatar snoyberg avatar

Watchers

 avatar  avatar  avatar

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.