Rust is just as fast as C/C++

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • ixy-languages

    A high-speed network driver written in C, Rust, C++, Go, C#, Java, OCaml, Haskell, Swift, Javascript, and Python

  • First of all, you are comparing some specific libraries/implementations, not programming languages. Theoretically you could always get the same performance using rust. Look at the last section here: https://github.com/ixy-languages/ixy-languages/blob/master/Rust-vs-C-performance.md In their case, the code generated by C2Rust compiled with rustc did actually run even slightly faster than the C code compiled directly using clang.

  • json-benchmark

    nativejson-benchmark in Rust

  • Of course that doesnt mean that in practice the available libraries are as optimized. Did you try actix? It tends to be faster than rocket. Also json-rust and simd-json are usually faster than serde-json, when you don't deserialize a known structure. Here are some benchmarks: https://github.com/serde-rs/json-benchmark

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • json

    Strongly typed JSON library for Rust (by serde-rs)

  • serde-rs/json#160: Parsing 20MB file using from_reader is slow

  • pest

    The Elegant Parser (by pest-parser)

  • ...at least, that's what I get from the "Nom may be faster, and Serde faster still, but we're fast enough" chart on pest's website.

  • MessagePack

    MessagePack serializer implementation for Java / msgpack.org[Java]

  • I have two suggestions Capnproto, MessagePack (those are only the two examples that came to mind first, i bet there are even one or two especially developed for rust). Both of these are better than json in nearly every way.

  • Cap'n Proto

    Cap'n Proto serialization/RPC system - core tools and C++ library

  • I have two suggestions Capnproto, MessagePack (those are only the two examples that came to mind first, i bet there are even one or two especially developed for rust). Both of these are better than json in nearly every way.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts