Improve an algorithm performance step by step

This page summarizes the projects mentioned and recommended in the original post on dev.to

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured
  1. RaBitQ

    [SIGMOD 2024] RaBitQ: Quantizing High-Dimensional Vectors with a Theoretical Error Bound for Approximate Nearest Neighbor Search

    Recently, I've been working on a new approximate nearest neighbor search algorithm called RaBitQ. The author has already provided a C++ implementation that runs quite fast. I tried to rewrite it in Rust (yet another RiiR). But I found that my implementation is much slower than the original one. Here is how I improve the performance step by step.

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. rabitq

    rabitq rust implementation (by kemingy)

    Recently, I've been working on a new approximate nearest neighbor search algorithm called RaBitQ. The author has already provided a C++ implementation that runs quite fast. I tried to rewrite it in Rust (yet another RiiR). But I found that my implementation is much slower than the original one. Here is how I improve the performance step by step.

  4. samply

    Command-line sampling profiler for macOS, Linux, and Windows

    I use samply to profile the Rust code. It has a nice integration with the Firefox Profiler. You can also share the profiling results with others by uploading them to the cloud. Here is an example of the C++ version profiling on GIST. The FlameGraph and CallTree are the most common views. Remember to grant the performance event permission and increase the mlock limit:

  5. profiler

    Firefox Profiler — Web app for Firefox performance analysis

    I use samply to profile the Rust code. It has a nice integration with the Firefox Profiler. You can also share the profiling results with others by uploading them to the cloud. Here is an example of the C++ version profiling on GIST. The FlameGraph and CallTree are the most common views. Remember to grant the performance event permission and increase the mlock limit:

  6. criterion.rs

    Statistics-driven benchmarking library for Rust

    Criterion is a good statistics-driven benchmark tool. I create another repo to store all the related benchmark code. It turns out that I should put them in the same repo.

  7. compiler-explorer

    Run compilers interactively from your web browser and interact with the assembly

    The GodBolt compiler explorer is also useful for comparing the assembly function code between C++ and Rust.

  8. rs_bench

    Criterion is a good statistics-driven benchmark tool. I create another repo to store all the related benchmark code. It turns out that I should put them in the same repo.

  9. Stream

    Stream - Scalable APIs for Chat, Feeds, Moderation, & Video. Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.

    Stream logo
  10. client_rust

    Prometheus / OpenMetrics client library in Rust

    Remember to add some metrics from the start. Many bugs and performance issues can be found by checking the metrics. I use AtomicU64 directly since the current requirements are simple. I may switch to the Prometheus metrics later.

  11. hnswlib

    Header-only C++/python library for fast approximate nearest neighbors

    After the profiling, I found that it still has f32::clone(). By checking the source code of nalgebra, I found that there are many clone for some reasons I don't know. I decide to write the SIMD by hand. Fortunately, hnswlib (a popular HNSW implementation) already implements this.

  12. faer-rs

    Linear algebra foundation for the Rust programming language (by sarah-quinones)

    I found another Rust algebra crate called faer while investigating the f32::clone() problem. It's optimized with lots of SIMD and provides better row/column iteration performance. The QR decomposition is also much faster than nalgebra. This commit 0411821 makes the training part faster.

  13. popcount

    Fastest possible x86 implementation of popcount/population count/Hamming weight/counting set bits

    This is a good reference for the popcnt implementation with AVX2. The commit edabd4a re-implement this in Rust which improves the QPS by 11% for GIST.

  14. bounds-check-cookbook

    Recipes for avoiding bounds checks in Rust, without unsafe!

    There is a bounds-check-cookbook which provides several examples of how to eliminate the boundary checking in safe Rust.

  15. llvm-project

    The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.

    I tried PGO and BOLT but didn't get any improvement.

  16. jemallocator

    Rust allocator using jemalloc as a backend (by tikv)

    Switching to jemalloc or mimalloc doesn't improve the performance either.

  17. mimalloc

    mimalloc is a compact general purpose allocator with excellent performance.

    Switching to jemalloc or mimalloc doesn't improve the performance either.

  18. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
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

  • Learn WGPU updated to 0.15!

    3 projects | /r/rust_gamedev | 16 Feb 2023
  • Linus Torvalds: Rust will go into Linux 6.1

    12 projects | /r/programming | 26 Sep 2022
  • Rust for the Kernel Could Possibly Be Merged for Linux 5.20

    13 projects | news.ycombinator.com | 23 Jun 2022
  • Why Developers Are Switching to Rust: The Rise of Rust Development in 2025

    1 project | dev.to | 15 Jul 2025
  • Tree Borrows

    9 projects | news.ycombinator.com | 9 Jul 2025

Did you know that Rust is
the 5th most popular programming language
based on number of references?