GithubHelp home page GithubHelp logo

brinkqiang2cpp / yyjson_benchmark Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ibireme/yyjson_benchmark

0.0 1.0 0.0 15.21 MB

Benchmark JSON library performance in C/C++

License: MIT License

CMake 3.59% C 89.71% Objective-C 2.51% C++ 4.19%

yyjson_benchmark's Introduction

JSON Benchmark

Benchmark JSON library performance in C/C++.

Requirement

  • A modern compiler or IDE supporting C11 and C++17.
  • CMake 3.5+ for building this project.
  • Git for interacting with the submodule in this repository.

Building

Clone this repository and initialize submodules:

git clone https://github.com/ibireme/yyjson_benchmark.git
cd yyjson_benchmark
git submodule update --init

Build and run:

mkdir build
cd build
cmake ..
cmake --build . --config Release
./yyjson_benchmark -o report.html

If you want to build with other compiler or IDE, try these commands:

# Clang for Linux/Unix:
cmake .. -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++

# Microsoft Visual Studio for Windows:
cmake .. -G "Visual Studio 16 2019" -A x64
cmake .. -G "Visual Studio 16 2019" -A Win32

# Xcode for macOS:
cmake .. -G Xcode

# Xcode for iOS:
cmake .. -G Xcode -DCMAKE_SYSTEM_NAME=iOS

If you want to build for arm64 device, you should add flag-DSIMDJSON_IMPLEMENTATION=arm64 for simdjson.

Results

Benchmark reports with interactive charts (update 2020-12-12)

Platform CPU Compiler OS Report
Intel NUC 8i5 Core i5-8259U msvc 2019 Windows 10 2004 Charts
Intel NUC 8i5 Core i5-8259U clang 10 Ubuntu 20.04 Charts
Intel NUC 8i5 Core i5-8259U gcc 9.3 Ubuntu 20.04 Charts
AWS EC2 c5a.large AMD EPYC 7002 gcc 9.3 Ubuntu 20.04 Charts
AWS EC2 t4g.medium Graviton2 (ARM64) gcc 9.3 Ubuntu 20.04 Charts
Apple iPhone 12 Pro A14 (ARM64) clang 12 iOS 14 Charts

JSON Datasets

File Size Format Content Info
twitter 616.7KB pretty The most commonly used test data from MiliYip. common
twitterescaped 549.2KB minify Same as twitter, with unicode escaped. common
github_events 63.6KB pretty GitHub event data from GitHub API. common
canada 2.1MB minify Contour of Canada border from MiloYip. full-length double
citm_catalog 1.6MB pretty A big benchmark file with indentation from RichardHightower repeated integers
and strings
lottie 282.2KB minify Lottie animation data downloaded from LottieFiles short string and number
gsoc-2018 3.2MB pretty GSoC Data of 2018. long ASCII string
poet 3.4MB pretty Poet data from chinese-poetry long CJK string
fgo 46.5MB minify Config data dumped from Japanese mobile game "Fate/Grand Order" real-world large file
otfcc 63.3MB minify OpenType data dumped from NotoSansJP-Regular.otf with otfcc real-world large file

yyjson_benchmark's People

Contributors

ibireme avatar

Watchers

James Cloos 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.