Giter VIP home page Giter VIP logo

circe-benchmarks's Introduction

circe

Build status Coverage status Maven Central Discord

circe is a JSON library for Scala (and Scala.js).

Please see the guide for more information about why circe exists and how to use it.

Community

Adopters

Are you using circe? Please consider opening a pull request to list your organization here:

Other circe organization projects

Please get in touch on Gitter if you have a circe-related project that you'd like to discuss hosting under the circe organization on GitHub.

  • circe-benchmarks: Benchmarks for comparing the performance of circe and other JSON libraries for the JVM.
  • circe-config: A library for translating between HOCON, Java properties, and JSON documents.
  • circe-derivation: Experimental generic derivation with improved compile times.
  • circe-fs2: A library that provides streaming JSON parsing and decoding built on fs2 and Jawn.
  • circe-iteratee: A library that provides streaming JSON parsing and decoding built on iteratee.io and Jawn.
  • circe-jackson: A library that provides Jackson-supported parsing and printing for circe.
  • circe-spray: A library that provides JSON marshallers and unmarshallers for Spray using circe.
  • circe-yaml: A library that uses SnakeYAML to support parsing YAML 1.1 into circe's Json.

Related projects

The following open source projects are either built on circe or provide circe support:

  • Actor Messenger: A platform for instant messaging.
  • akka-http-json: A library that supports using circe for JSON marshalling and unmarshalling in Akka HTTP.
  • akka-stream-json: A library that provides JSON support for stream based applications using Jawn as a parser with a convenience example for circe.
  • Argus: Generates models and circe encoders and decoders from JSON schemas.
  • Blackdoor JOSE: circe JSON support for blackdoor JOSE and JWT.
  • borer: Allows circe encoders/decoders to be reused for CBOR (de)serialization.
  • circe-debezium: Circe codecs for Debezium payload types
  • circe-geojson: Circe support for GeoJSON (RFC 7946)
  • circe-kafka: Implicit conversion of Encoder and Decoder into Kafka Serializer/Deserializer/Serde
  • cornichon: A DSL for JSON API testing.
  • Cosmos: An API for DCOS services that uses circe.
  • crjdt: A conflict-free replicated JSON datatype in Scala.
  • diffson: A Scala diff / patch library for JSON.
  • elastic4s: A Scala client for Elasticsearch with circe support.
  • Enumeratum: Enumerations for Scala with circe integration.
  • Featherbed: A REST client library with circe support.
  • Finch: A library for building web services with circe support.
  • fintrospect: HTTP contracts for Finagle with circe support.
  • fluflu: A Fluentd logger.
  • Github4s: A GitHub API wrapper written in Scala.
  • content-api-models: The Guardian's Content API Thrift models.
  • http4s: A purely functional HTTP library for client and server applications.
  • IdeaLingua: Staged Interface Definition and Data Modeling Language & RPC system currently targeting Scala, Go, C# and TypeScript. Scala codegen generates models and JSON codecs using circe.
  • Iglu Schema Repository: A JSON Schema repository with circe support.
  • jsactor: An actor library for Scala.js with circe support.
  • jsoniter-scala-circe: A booster for faster parsing/printing to/from circe AST and decoding/encoding of java.time._ and BigInt types.
  • jwt-circe: A JSON Web Token implementation with circe support.
  • kadai-log: A logging library with circe support.
  • msgpack4z-circe: A MessagePack implementation with circe support.
  • ohNoMyCirce: Friendly compile error messages for shapeless's Generic, circe's Encoder & Decoder and slick's case class mapping.
  • play-circe: circe support for Play!.
  • pulsar4s: A Scala client for Apache-Pulsar with circe support.
  • Rapture: Support for using circe's parsing and AST in Rapture JSON.
  • roc: A PostgreSQL client built on Finagle.
  • sangria-circe: circe marshalling for Sangria, a GraphQL implementation.
  • scalist: A Todoist API client.
  • scala-jsonapi: Scala support library for integrating the JSON API spec with Spray, Play! or Circe
  • scala-json-rpc: JSON-RPC 2.0 library for Scala and Scala.js
  • scalatest-json-circe: Scalatest matchers for Json with appropriate equality and descriptive error messages.
  • Scio: A Scala API for Apache Beam and Google Cloud Dataflow, uses circe for JSON IO
  • seals: Tools for schema evolution and language-integrated schemata (derives circe encoders and decoders).
  • shaclex: RDF validation using SHACL or ShEx.
  • Slick-pg: Slick extensions for PostgreSQL.
  • sttp: Scala HTTP client.
  • Synapses: A lightweight Neural Network library, for js, jvm and .net.
  • telepooz: A Scala wrapper for the Telegram Bot API built on circe.
  • Zenith: Functional HTTP library built on circe.

Examples

The following projects provide examples, templates, or benchmarks that include circe:

Contributors and participation

circe is a fork of Argonaut, and if you find it at all useful, you should thank Mark Hibberd, Tony Morris, Kenji Yoshida, and the rest of the Argonaut contributors.

circe is currently maintained by Darren Gibson and Erlend Hamnaberg. After the 1.0 release, all pull requests will require two sign-offs by a maintainer to be merged.

The circe project is a typelevel affiliate project, and follow the Typelevel Code of Conduct

Please see the contributors' guide for details on how to submit a pull request.

License

circe is licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

circe-benchmarks's People

Contributors

jensraaby avatar n4to4 avatar scala-steward avatar travisbrown avatar vpetro avatar yarosman avatar zmccoy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

circe-benchmarks's Issues

Improvement: comparing Circe and Jackson

Hello there,

Here in the company we have been creating services in Scala. Some of them is using Circe, a few others Jackson. Because we want to standardise, I started searching for a benchmark comparing them, which as far as I know, there isn't any.

So I pulled your repo and I included the Jackson benchmark in the code. Then I ran the following commands:

sbt "jmh:run -i 10 -wi 10 -f 2 -t 1 io.circe.benchmarks.EncodingBenchmark"
sbt "jmh:run -i 10 -wi 10 -f 2 -t 1 io.circe.benchmarks.DecodingBenchmark"
sbt "jmh:run -i 10 -wi 10 -f 2 -t 1 io.circe.benchmarks.ParsingBenchmark"

And here is the result:

EncodingBenchmark

Benchmark                              Mode  Cnt      Score       Error  Units
EncodingBenchmark.encodeFoosJackson   thrpt   20   4747.077 ±   327.892  ops/s
EncodingBenchmark.encodeFoosCirce     thrpt   20   3534.268 ±   379.940  ops/s
EncodingBenchmark.encodeFoosArgonaut  thrpt   20   2680.524 ±   376.456  ops/s
EncodingBenchmark.encodeFoosSpray     thrpt   20   2567.896 ±   188.934  ops/s
EncodingBenchmark.encodeFoosPlay      thrpt   20   1130.935 ±    91.660  ops/s
EncodingBenchmark.encodeFoos4s        thrpt   20    544.854 ±    99.796  ops/s

EncodingBenchmark.encodeIntsArgonaut  thrpt   20  26761.624 ±  3090.205  ops/s
EncodingBenchmark.encodeIntsJackson   thrpt   20  48284.294 ±  5104.759  ops/s
EncodingBenchmark.encodeIntsCirce     thrpt   20  41756.808 ± 13966.970  ops/s
EncodingBenchmark.encodeIntsSpray     thrpt   20  26407.028 ±   630.188  ops/s
EncodingBenchmark.encodeIntsPlay      thrpt   20  14023.244 ±  3349.223  ops/s
EncodingBenchmark.encodeInts4s        thrpt   20   4494.176 ±   353.332  ops/s

DecodingBenchmark

Benchmark                              Mode  Cnt      Score      Error  Units
DecodingBenchmark.decodeFoosCirce     thrpt   20   6077.733 ±  312.529  ops/s
DecodingBenchmark.decodeFoosSpray     thrpt   20   3148.257 ±   93.745  ops/s
DecodingBenchmark.decodeFoosJackson   thrpt   20   2522.578 ±  109.721  ops/s
DecodingBenchmark.decodeFoosArgonaut  thrpt   20   1538.814 ±   74.439  ops/s
DecodingBenchmark.decodeFoosPlay      thrpt   20   1389.449 ±   49.782  ops/s
DecodingBenchmark.decodeFoos4s        thrpt   20   1073.019 ±   45.923  ops/s

DecodingBenchmark.decodeIntsSpray     thrpt   20  50820.965 ± 4725.008  ops/s
DecodingBenchmark.decodeIntsCirce     thrpt   20  30170.457 ±  734.433  ops/s
DecodingBenchmark.decodeIntsJackson   thrpt   20  27444.723 ±  632.239  ops/s
DecodingBenchmark.decodeIntsPlay      thrpt   20  11464.960 ±  814.165  ops/s
DecodingBenchmark.decodeIntsArgonaut  thrpt   20  11080.127 ±  943.851  ops/s
DecodingBenchmark.decodeInts4s        thrpt   20   8058.288 ±  565.929  ops/s

ParsingBenchmark

Benchmark                            Mode  Cnt      Score      Error  Units
ParsingBenchmark.parseFoosJackson   thrpt   20   3803.383 ±  143.685  ops/s
ParsingBenchmark.parseFoosSpray     thrpt   20   2605.591 ±  144.410  ops/s
ParsingBenchmark.parseFoosCirce     thrpt   20   2270.309 ±   73.920  ops/s
ParsingBenchmark.parseFoosPlay      thrpt   20   2109.209 ±  174.506  ops/s
ParsingBenchmark.parseFoos4s        thrpt   20   2051.549 ±   63.897  ops/s
ParsingBenchmark.parseFoosArgonaut  thrpt   20   1703.708 ±   72.967  ops/s

ParsingBenchmark.parseIntsJackson   thrpt   20  30286.016 ± 1523.783  ops/s
ParsingBenchmark.parseIntsCirce     thrpt   20  17211.614 ±  667.697  ops/s
ParsingBenchmark.parseIntsSpray     thrpt   20  14300.657 ±  754.562  ops/s
ParsingBenchmark.parseIntsArgonaut  thrpt   20  10315.202 ±  429.667  ops/s
ParsingBenchmark.parseIntsPlay      thrpt   20   9455.802 ±  468.896  ops/s
ParsingBenchmark.parseInts4s        thrpt   20   6536.145 ±  239.060  ops/s

I want to know if you want this addition in the repo. If yes, I will create a pull request.
Let me know what you think of it :)

Clean up benchmark output

The current benchmark output is difficult to read. The name of the library under test is abbreviated, leaving it up to the reader to figure out which symbol means what. This abbreviation doesn't achieve much, especially since the redundant strings "DecodingBenchmark.decodeFoo" and "EncodingBenchmark.encodeFoo" are always printed.

Renaming "DecodingBenchmark.decodeFooC" to something like "Decoding.Foo.Circe" would be easier to understand.

Benchmark Mode Cnt Score Error Units
DecodingBenchmark.decodeFoosC thrpt 100 10161.304 ± 102.923 ops/s
DecodingBenchmark.decodeFoosA thrpt 100 2786.826 ± 43.675 ops/s
DecodingBenchmark.decodeFoosP thrpt 100 1974.245 ± 9.858 ops/s
DecodingBenchmark.decodeFoosPico thrpt 100 2106.936 ± 31.172 ops/s
DecodingBenchmark.decodeFoosS thrpt 100 8193.956 ± 38.757 ops/s

DecodingBenchmark.decodeIntsC thrpt 100 50399.910 ± 156.052 ops/s
DecodingBenchmark.decodeIntsA thrpt 100 20472.141 ± 412.459 ops/s
DecodingBenchmark.decodeIntsP thrpt 100 15146.795 ± 68.217 ops/s
DecodingBenchmark.decodeIntsPico thrpt 100 15760.650 ± 972.880 ops/s
DecodingBenchmark.decodeIntsS thrpt 100 81535.344 ± 293.525 ops/s

Benchmark Mode Cnt Score Error Units
EncodingBenchmark.encodeFoosC thrpt 100 8565.560 ± 107.385 ops/s
EncodingBenchmark.encodeFoosA thrpt 100 6736.379 ± 15.906 ops/s
EncodingBenchmark.encodeFoosP thrpt 100 1765.981 ± 4.078 ops/s
EncodingBenchmark.encodeFoosPico thrpt 100 5779.484 ± 26.803 ops/s
EncodingBenchmark.encodeFoosS thrpt 100 6561.330 ± 29.160 ops/s

EncodingBenchmark.encodeIntsC thrpt 100 98093.604 ± 223.612 ops/s
EncodingBenchmark.encodeIntsA thrpt 100 80580.759 ± 323.298 ops/s
EncodingBenchmark.encodeIntsP thrpt 100 29823.703 ± 451.211 ops/s
EncodingBenchmark.encodeIntsPico thrpt 100 37110.701 ± 145.859 ops/s
EncodingBenchmark.encodeIntsS thrpt 100 43733.808 ± 2810.698 ops/s

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.