sonic VS simdjson

Compare sonic vs simdjson and see what are their differences.

sonic

A blazingly fast JSON serializing & deserializing library (by bytedance)

simdjson

Parsing gigabytes of JSON per second : used by Facebook/Meta Velox, the Node.js runtime, ClickHouse, WatermelonDB, Apache Doris, Milvus, StarRocks (by simdjson)
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
sonic simdjson
23 70
7,217 19,576
3.5% 1.0%
8.0 8.9
5 days ago 4 days ago
Assembly C++
Apache License 2.0 Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

sonic

Posts with mentions or reviews of sonic. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-21.

simdjson

Posts with mentions or reviews of simdjson. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-09-17.
  • User-Space Interrupts (2021)
    2 projects | news.ycombinator.com | 17 Sep 2024
    AVX-512 is on Zen5. Ultra-popular libraries like simdjson can use it. https://github.com/simdjson/simdjson/issues/10

    In general my hope is that runtimes pick up the good stuff & roll with it. Io_uring hasn't exactly been a stunning success on nidejs/libuv but the promise is so real that runtimes can take sweet io capabilities like io_uring or usersoace interrupts & boom, now everyone's ok is faster.

  • Wc2: Investigates optimizing 'wc', the Unix word count program
    15 projects | news.ycombinator.com | 20 Jun 2024
    State machines are great for complex situations, but when it comes to performance, it's not at all clear to me that they're the most scalable approach with modern systems.

    The data dependency between a loop iteration for each character might be pipelined really well when executed, and we can assume large enough L1/L2 cache for our lookup tables. But we're still using at least one lookup per character.

    Projects like https://github.com/simdjson/simdjson?tab=readme-ov-file#abou... are truly fascinating, because they're based on SIMD instructions that can process 64 or more bytes with a single instruction. Very much worth checking out the papers at the link above.

  • Scan HTML faster with SIMD instructions – Chrome edition
    7 projects | news.ycombinator.com | 13 Jun 2024
    Can you point to some of these benchmarks? https://news.ycombinator.com/item?id=26934854 suggests that in at least one synthetic benchmark (with a 7.5KB protobuf message which expands to a 17KB JSON payload), protobuf parsing at 2GB/s would be comparable to JSON parsing at 5GB/s.

    Meanwhile, simdjson's numbers (https://github.com/simdjson/simdjson/blob/master/doc/gbps.pn...) show a peak parsing speed of about 3GB/s depending on the workload. Of course, it's not clear you can compare these directly, since they were probably not run on systems with comparable specs. But it's not clear to me that there's a 5x difference.

    Perhaps my experience differs because I'm used to seeing very large messages being passed around, but I'd be happy to reconsider. (Or maybe I should go all-in on Cap'n Proto.)

  • SIMD < SIMT < SMT: Parallelism in Nvidia GPUs (2011)
    1 project | news.ycombinator.com | 11 Jun 2024
    I intentionally said "more towards embarrassingly parallel" rather than "only embarrassingly parallel". I don't think there's a hard cutoff, but there is a qualitative difference. One example that springs to mind is https://github.com/simdjson/simdjson - afaik there's no similarly mature GPU-based JSON parsing.
  • The Simdjson Library
    4 projects | news.ycombinator.com | 3 Jun 2024
  • Tips on adding JSON output to your command line utility. (2021)
    2 projects | news.ycombinator.com | 20 Apr 2024
    It's also supported by simdjson [0] (which has a lot of language bindings [1]):

    > Multithreaded processing of gigantic Newline-Delimited JSON (ndjson) and related formats at 3.5 GB/s

    [0] https://simdjson.org/

    [0] https://github.com/simdjson/simdjson?tab=readme-ov-file#bind...

  • 1BRC Merykitty's Magic SWAR: 8 Lines of Code Explained in 3k Words
    4 projects | news.ycombinator.com | 9 Mar 2024
  • Training great LLMs from ground zero in the wilderness as a startup
    3 projects | news.ycombinator.com | 6 Mar 2024
  • simdjson: Parsing Gigabytes of JSON per Second
    1 project | news.ycombinator.com | 23 Jan 2024
  • Use any web browser as GUI, with Zig in the back end and HTML5 in the front end
    17 projects | news.ycombinator.com | 1 Jan 2024
    String parsing is negligible compared to the speed of the DOM which is glacially slow: https://news.ycombinator.com/item?id=38835920

    Come on, people, make an effort to learn how insanely fast computers are, and how insanely inefficient our software is.

    String parsing can be done at gigabytes per second: https://github.com/simdjson/simdjson If you think that is the slowest operation in the browser, please find some resources that talk about what is actually happening in the browser?

What are some alternatives?

When comparing sonic and simdjson you can also consider the following projects:

jsoniter - Using encoding/json to load parts of a large json document

RapidJSON - A fast JSON parser/generator for C++ with both SAX/DOM style API

fastjson - Fast JSON parser and validator for Go. No custom structs, no code generation, no reflection

jsoniter - jsoniter (json-iterator) is fast and flexible JSON parser available in Java and Go

encoding - Go package containing implementations of efficient encoding, decoding, and validation APIs.

json - JSON for Modern C++

simdjson-go - Golang port of simdjson: parsing gigabytes of JSON per second

json-schema-validator - JSON schema validator for JSON for Modern C++

json-iterator - Low level iterator on the records inside large JSON file.

JsonCpp - A C++ library for interacting with JSON.

hashmap - A Golang lock-free thread-safe HashMap optimized for fastest read access.

json - A C++11 library for parsing and serializing JSON to and from a DOM container in memory.

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured