Benchmarking manual implementation of memcpy in Rust

Overview

Manual memcpy Benchmark

Benchmarks that compare copying data between two Vec s using std::slice::copy_from_slice and a loop that copies one byte at a time.

Usage

Run the benchmark with cargo bench.

Results

Compiled with rustc 1.60.0-nightly (498eeb72f 2022-01-31). Run on Intel i7-7500U (2.70 GHz) with Ubuntu 21.04.

copy/16KiB_stdlib       time:   [2.0702 us 2.0888 us 2.1052 us]                               
Found 13 outliers among 100 measurements (13.00%)
  13 (13.00%) low mild
copy/16KiB_manual       time:   [1.9551 us 1.9761 us 1.9939 us]                               
Found 6 outliers among 100 measurements (6.00%)
  6 (6.00%) low mild
copy/128KiB_stdlib      time:   [17.378 us 20.227 us 23.406 us]                               
Found 30 outliers among 100 measurements (30.00%)
  14 (14.00%) low mild
  2 (2.00%) high mild
  14 (14.00%) high severe
copy/128KiB_manual      time:   [13.238 us 13.361 us 13.463 us]                               
Found 11 outliers among 100 measurements (11.00%)
  11 (11.00%) low mild
copy/1MiB_stdlib        time:   [422.28 us 422.97 us 423.78 us]                             
Found 29 outliers among 100 measurements (29.00%)
  15 (15.00%) low severe
  5 (5.00%) low mild
  3 (3.00%) high mild
  6 (6.00%) high severe
copy/1MiB_manual        time:   [359.13 us 359.54 us 360.00 us]                             
Found 23 outliers among 100 measurements (23.00%)
  14 (14.00%) low severe
  5 (5.00%) low mild
  2 (2.00%) high mild
  2 (2.00%) high severe
copy/16MiB_stdlib       time:   [7.6757 ms 7.6886 ms 7.7045 ms]                              
Found 11 outliers among 100 measurements (11.00%)
  2 (2.00%) high mild
  9 (9.00%) high severe
copy/16MiB_manual       time:   [6.3536 ms 6.3821 ms 6.4262 ms]                              
Found 11 outliers among 100 measurements (11.00%)
  5 (5.00%) high mild
  6 (6.00%) high severe
You might also like...
Statistics-driven benchmarking library for Rust

Criterion.rs Statistics-driven Microbenchmarking in Rust Getting Started | User Guide | Master API Docs | Released API Docs | Changelog | | Criterion.

Experimental one-shot benchmarking/profiling harness for Rust

Iai Experimental One-shot Benchmark Framework in Rust Getting Started | User Guide | Released API Docs | Changelog Iai is an experimental benchmarking

Benchmarking web frameworks written in rust with rewrk tool.

Web Framework Benchmarks Benchmarking web frameworks written in rust with rewrk tool.

Benchmarking C, Python, and Rust on the "sp" problem

Fast SP Various implementations of the problem in this blog post. Requirements To run this, you will need Rust Nightly and Python 3.8+ with numpy. Rus

A Rust on-site channel benchmarking helper. Inter-Process (async / busy) & Intra-Process (async single threaded / async multi threaded)

On-Site Rust Channel Benchmarking Helper Deploy on server to determine which public crates are the fastest for communicating in different architecture

A command-line benchmarking tool
A command-line benchmarking tool

hyperfine δΈ­ζ–‡ A command-line benchmarking tool. Demo: Benchmarking fd and find: Features Statistical analysis across multiple runs. Support for arbitra

A command-line benchmarking tool
A command-line benchmarking tool

hyperfine δΈ­ζ–‡ A command-line benchmarking tool. Demo: Benchmarking fd and find: Features Statistical analysis across multiple runs. Support for arbitra

A tiny, super simple and portable benchmarking library.

benchmark-simple A tiny benchmarking library for Rust. Trivial to use Works pretty much everywhere, including WebAssembly (WASI, but also in-browser)

clockchain is a system for benchmarking smart contract execution times across blockchains.
clockchain is a system for benchmarking smart contract execution times across blockchains.

Clockchain Clockchain is a research tool for benchmarking smart contract execution times across blockchains using Arcesco-- a block-chain agnostic ins

clockchain is a system for benchmarking smart contract execution times across blockchains.
clockchain is a system for benchmarking smart contract execution times across blockchains.

Clockchain Clockchain is a research tool for benchmarking smart contract execution times across blockchains using Arcesco-- a block-chain agnostic ins

A unix "time" like benchmarking tool on steroids

benchie Usage Binary Once Rust is installed (see step 1 in "Toolchain Setup"), you can easily install the latest version of benchie with: $ cargo inst

ObfusEval is the benchmarking tool to evaluate the reliability of the code obfuscating transformation.

ObfusEval ObfusEval is the benchmarking tool to evaluate the reliability of the code obfuscating transformation. The following two metrics related the

An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.

regex A Rust library for parsing, compiling, and executing regular expressions. Its syntax is similar to Perl-style regular expressions, but lacks a f

rinflux is Rust based influx client implementation that have been inspired from influx other language implementation, developed with πŸ’–
rinflux is Rust based influx client implementation that have been inspired from influx other language implementation, developed with πŸ’–

Unofficial InfluxDB Driver for Rust This library is a work in progress. This means a feature you might need is not implemented yet or could be handled

A SIMD implementation of Keccak256 for aarch64, forked from Remco Bloeman's Goldilocks K12 implementation.

keccak256-aarch64 Warning This crate was forked from real cryptographers (Goldilocks by Remco Bloeman), by not a real cryptographer. Do not use this k

MessagePack implementation for Rust / msgpack.org[Rust]

RMP - Rust MessagePack RMP is a pure Rust MessagePack implementation. This repository consists of three separate crates: the RMP core and two implemen

Stretto is a Rust implementation for ristretto. A high performance memory-bound Rust cache.

Stretto is a Rust implementation for ristretto. A high performance memory-bound Rust cache.

Rust implementation of Andrej Karpathy's micrograd for purposes of learning both ML and Rust.

micrograd_rs Rust implementation of Andrej Karpathy's micrograd for purposes of learning both ML and Rust. Main takeaways Basically the same takeaways

A rust chess implementation using a neural network scoring function built on huggingface/candle + rust + wasm

Rusty Chess What is it? Rusty Chess aims to be a high quality embeddable chess engine that runs entirely locally in the browser (no backend required).

Owner
Adam Bratschi-Kaye
Adam Bratschi-Kaye
Rust library to interract with memory written in rust

memory-rs Rust library to interract with memory written in rust It comes with: Pattern scanner (Return address for a pattern given). A pattern example

Alex 1 Jan 13, 2022
MiniDump a process in memory with rust

safetydump Rust in-memory MiniDump implementation. Features ntdll!NtGetNextProcess to obtain a handle for the desired ProcessId as opposed to kernel32

null 26 Oct 11, 2022
A cross-platform and safe Rust API to create and manage memory mappings in the virtual address space of the calling process.

mmap-rs A cross-platform and safe Rust API to create and manage memory mappings in the virtual address space of the calling process. This crate can be

S.J.R. van Schaik 19 Oct 23, 2022
Cross-platform library for reading/writing memory in other processes for Rust

vmemory Rust library for reading/writing memory in other processes for Windows, macOS, Linux, and in the future potentially, BSD variants. Rationale A

Jason Johnson 26 Nov 7, 2022
An attempt to implement equivalent of C++ "P1478R1: Byte-wise atomic memcpy" in Rust

atomic-memcpy Byte-wise atomic memcpy. This is an attempt to implement equivalent of C++ "P1478R1: Byte-wise atomic memcpy" in Rust. This is expected

Taiki Endo 12 Dec 1, 2022
Generate manual pages from mdBooks!

mdbook-man Generate man pages from mdBooks! Usage To use mdbook-man you'll first need to install it with: $ cargo install mdbook-man And add the follo

Wojciech KΔ™pka 22 Oct 6, 2022
Converts a MO loadorder to loot rules for manual loadorders

lootifier Converts a Mod Organizer loadorders to loot rules for manual loadorders Long Description This tool is meant for people who want to share mod

alsa 4 Nov 12, 2022
Finds imports that could be exploited, still requires manual analysis.

drv-vuln-scanner Vulnerable driver scanning tool for win64, put drivers to scan in drv/. Finds imports that could be exploited, still requires manual

selene 24 Dec 10, 2022
πŸ”₯ πŸ“ (fwdt) "few word do trick" is a cross platform manual fast logger

Few Word Do Trick (fwdt) Few Word Do Trick (fwdt) is a cross-platform general purpose fast logger for humans that supports incomplete csvs for a bette

Alex Hallam 15 Feb 3, 2023
A skyline mod that enables manual choosing of desired input latency in Smash Ultimate, compatible with every online mode.

Latency Slider (Definitive Edition) This is a fork of - and an improvement upon - the original "Arena Latency Slider". Unfortunately, upon SSBU updati

null 8 Mar 5, 2024