boost VS simdjson

Compare boost vs simdjson and see what are their differences.

boost

My personal boost mirror to be submoduled by my projects (by darwin)

simdjson

Parsing gigabytes of JSON per second : used by Facebook/Meta Velox, the Node.js runtime, ClickHouse, WatermelonDB, Apache Doris, Milvus, StarRocks (by simdjson)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
boost simdjson
17 65
1 18,362
- 1.2%
10.0 9.2
over 13 years ago 18 days ago
C++ C++
Boost Software License 1.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.

boost

Posts with mentions or reviews of boost. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-11-18.
  • Inside boost::unordered_flat_map
    11 projects | /r/cpp | 18 Nov 2022
  • coost v3.0.0 released - A tiny boost library in C++11
    2 projects | /r/cpp | 8 Sep 2022
    coost is a cross-platform C++ basic library with both performance and ease of use. It is like boost, but much smaller, the static library built on linux and mac is only about 1MB in size. Although small, it provides enough powerful features:
  • Ask HN: Is ease in getting started the key for Python's success?
    2 projects | news.ycombinator.com | 9 Aug 2022
    Not so much ease, as flexibility.

    In the end, the thing that matters the most for software is being able to get logic into code as efficiently as possible. This includes being able to write concise code, being able to execute it and see results, debug it efficiently, use libraries easily, and deploy it to production. Python has all of this.

    The rest of the stuff, like strong typing, memory safety, e.t.c are at best academic. The supposed advantages of those just don't hold up once you start to look into the real world. Linux, which runs on most devices that support an os hardware wise, is written purely in C. Python is used as a backend for very big projects like Youtube, Instagram, Spotify, e.t.c. Its also used to run Openpilot (https://github.com/commaai/openpilot), which has performance on par with Teslas autopilot.

    Meanwhile in Java world, with strict typing, you have egregious vulnerabilities like log4shell, amongst others (https://java-0day.com/).

    Language evolution is also a thing to look at with this stuff. The more "strict" you try to make a language, the worse its going to become as people are necessarily going to find hacks around it. With java, type safety strict features like having getters and setters get abstracted away behind an annotation processor that hacks the AST (Lombok), and thats not only considered ok, but is encouraged to be used. With C++, template metaprogramming got extremely out of hand with https://www.boost.org/, where the error messages for one thing used to be pages long. Rust manage to sneak this under the radar with the unsafe clause, which is going to see standard use in many codebases, thus negating any of its advantages.

    In the end, good code comes from good developers, full stop. Every codebase will necessarily have tests for production deployment, and anything that language features don't catch during compilation or static checking can be checked with testing if you have developers that understand what they are doing and can write appropriate testing frameworks.

    And based on that, its pretty attractive to use Python especially when you consider developer time. And the flexibility means you can write your code in different forms to suit your use case, where it be OOP with MyPy type checking, functional, imperative, or super complex if you want.

  • Compile-Time Hash in Plain C (Not Only C++) is Now Possible!
    2 projects | dev.to | 9 Aug 2022
    For those who didn't know what is Boost, it's a C++ library that helps to prevent re-inventing the wheel while trying to program something quite complex as example looping only with macro, Boost Preprocessor. Fortunately, Boost Preprocessor Repeat also works with plain C, not only C++. So, my OrangePi board can calculate hash at compile-time. Unfortunately, my SIX Hash algorithm requires sizeof(input) and Boost... won't... work... with it. Hours of workarounds, no luck.
  • How do I connect a REST API with C++?
    3 projects | /r/cpp_questions | 31 Jul 2022
    If you have the ability to use third-party libraries (though if you can't this project is going to be a nightmare, lol...) I would recommend using the Beast library from the Boost collection of libraries. It's a little bit more verbose than some options, but not that much more, and it's better maintained. REST webservices are built on top of the HTTP framework, so it's just a matter of sending a HTTP GET request to a server (or POST/UPDATE/DELETE, depending on how exactly the api on the other end is implemented) and reading the response you get back. This is a very basic sample of a client sending a GET request to a server. If you need to change this to do a POST (or some other kind of request), there's only two real changes that need to be made:
  • Can anyone explain the differences of Conda vs Pip?
    2 projects | /r/Python | 22 Jul 2022
    The person you replied to used slightly confusing terminology. Conda deals with non-python packages. As in if you wanted to install boost for C++.
  • Looking to download/use Boost
    1 project | /r/cpp_questions | 6 Jul 2022
    I'm not sure if its just me but I'm finding I can't access any of the download links on the Boost Website.
  • Resources for experienced C programmer for C++20/17/13
    4 projects | /r/cpp | 29 Jun 2022
  • How to write reflection for C++
    8 projects | dev.to | 22 Jun 2022
    rich standard library and Boost;
  • Where to read about modern C++ features which you should use?
    2 projects | /r/Cplusplus | 17 Jun 2022
    Boost is also another ubiquitous library. Lots of code that doesn't make it into the standard kind of ends up here. Lots of code that gets into the standard starts here. Boost.Asio might end up being our network API in 23.

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-04-20.
  • 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?

  • Cray-1 performance vs. modern CPUs
    4 projects | news.ycombinator.com | 25 Dec 2023
    Thanks for all the detailed information! That answers a bunch of my questions and the implementation of strlen is nice.

    The instruction I was thinking of is pshufb. An example ‘weird’ use can be found for detecting white space in simdjson: https://github.com/simdjson/simdjson/blob/24b44309fb52c3e2c5...

    This works as follows:

    1. Observe that each ascii whitespace character ends with a different nibble.

    2. Make some vector of 16 bytes which has the white space character whose final nibble is the index of the byte, or some other character with a different final nibble from the byte (eg first element is space =0x20, next could be eg 0xff but not 0xf1 as that ends in the same nibble as index)

    3. For each block where you want to find white space, compute pcmpeqb(pshufb(whitespace, input), input). The rules of pshufb mean (a) non-ascii (ie bit 7 set) characters go to 0 so will compare false, (b) other characters are replaced with an element of whitespace according to their last nibble so will compare equal only if they are that whitespace character.

    I’m not sure how easy it would be to do such tricks with vgather.vv. In particular, the length of the input doesn’t matter (could be longer) but the length of white space must be 16 bytes. I’m not sure how the whole vlen stuff interacts with tricks like this where you (a) require certain fixed lengths and (b) may have different lengths for tables and input vectors. (and indeed there might just be better ways, eg you could imagine an operation with a 256-bit register where you permute some vector of bytes by sign-extending the nth bit of the 256-bit register into the result where the input byte is n).

  • Codebases to read
    5 projects | /r/cpp | 5 Dec 2023
    Additionally, if you like low level stuff, check out libfmt (https://github.com/fmtlib/fmt) - not a big project, not difficult to understand. Or something like simdjson (https://github.com/simdjson/simdjson).
  • Simdjson: Parsing Gigabytes of JSON per Second
    1 project | news.ycombinator.com | 30 Nov 2023
  • Building a high performance JSON parser
    19 projects | news.ycombinator.com | 5 Nov 2023
    Everything you said is totally reasonable. I'm a big fan of napkin math and theoretical upper bounds on performance.

    simdjson (https://github.com/simdjson/simdjson) claims to fully parse JSON on the order of 3 GB/sec. Which is faster than OP's Go whitespace parsing! These tests are running on different hardware so it's not apples-to-apples.

    The phrase "cannot go faster than this" is just begging for a "well ackshully". Which I hate to do. But the fact that there is an existence proof of Problem A running faster in C++ SIMD than OP's Probably B scalar Go is quite interesting and worth calling out imho. But I admit it doesn't change the rest of the post.

  • New package : lspce - a simple LSP Client for Emacs
    4 projects | /r/emacs | 30 Jun 2023
    I have same question as /u/JDRiverRun : how do you deal with JSON, do you parse json on Rust side or on Emacs side. I see that you are requiring json.el in your lspce.el, but I haven't looked through entire file carefully. If you parse on Rust side, do you use simdjson (there are at least two Rust bindings to it)? If yes, what are your impressions, experiences compared to more "standard" json library?

What are some alternatives?

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

jackson-databind - General data-binding package for Jackson (2.x): works on streaming API (core) implementation(s)

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

coost - A tiny boost library in C++11.

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

cppinsights - C++ Insights - See your source code with the eyes of a compiler

json - JSON for Modern C++

GSL - Guidelines Support Library

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

restclient-cpp - C++ client for making HTTP/REST requests

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

flat_hash_map - A very fast hashtable

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