Open1

Rust , Go , Node 速度調査 Redis版

knaka Tech-Blogknaka Tech-Blog

概要

  • Rust 速度 速度調査メモになります。
  • redis database 使用
  • CLI 版です。
  • db処理の速度計測です。処理の目安にはなるかと想定しました。

[ 公開 2025/06/24 ]


環境

  • redis (windows)
  • Rust: cargo 1.83.0
  • go: 1.24.4
  • node 20

関連

  • install 関連

https://github.com/microsoftarchive/redis/releases


測定方法

  • redis 書き込み 1,000件
  • 数件測定、平均時間を計算
  • 1,000件後の、登録完了後の短時間の種類が、高速実行の判断

結果

  • 先に、結果です。
  • Go > Rust > Node
  • Goが高速、 Nodeが遅い
  • Go , Rust が近い速度
  • 単位: msec(ミリ秒)
Go Rust Node
36.11 38.64 125.09


テスト用のコード

  • Rust

https://gist.github.com/kuc-arc-f/79b085ae6ce80dd3f24791625a6a1f4e

  • Go

https://gist.github.com/kuc-arc-f/bf224ff0e315058cfccfe0312ae6dcee

  • Node

https://gist.github.com/kuc-arc-f/e44cbfe749aac474225a00dbf0977188


まとめ

  • node以外の JSランタイムを計測できてないので。不十分の部分あります。
  • 数年前(3、4年前) は、Rustは 遅いイメージでしたが。
  • 最近は、Rustやや高速に見えました。