speed

command
v2.5.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Speed measures how fast the parts of building and checking a tree are, on one file held in memory, so that no disk is in the way.

go run ./examples/speed [MiB [folder]]

It prints, for a file of that many MiB of bytes that look random: chunking alone, hashing alone, building the file into a store in memory, checking every chunk of it again, fetching it into a second store as a receiver would, and writing it as a bundle and reading that into a third. Without a number, the file is 1 GiB.

With a folder, it also builds that folder from disk into a store in memory, and prints the best of five runs: by then the system holds the files in memory, so it is the library that is measured and not the disk.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL