Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tcopy

A multi-threaded, hardware-accelerated file copier.

tcopy is a high-speed alternative to the standard Windows Copy-Item. It solves the "Small File Bottleneck" by using a work-stealing parallel engine to dispatch multiple copy operations simultaneously, saturating the disk's IO bandwidth.

Performance (10 Run Average)

Tested on a 7-year-old PC with 1,000 small files:

Command Avg_ms Status
tcopy (Rust) 759.70 ms Winner
Copy-Item (Win) 1332.66 ms Slower

Result: tcopy is 1.75x faster than the native Windows command.

The Squeeze: Why it's faster

  • Rayon Parallel Engine: Instead of copying one file at a time, tcopy uses a thread pool to copy several files in parallel. This hides the "latency" (wait time) of the disk.
  • Kernel-Level Handover: Uses std::fs::copy, which triggers the low-level OS CopyFileEx API, moving data efficiently without unnecessary jumps back and forth to the program.
  • Pre-calculated Tree: The tool maps the entire source directory into a vector before starting. This allows the CPU to plan the most efficient way to "attack" the folders.

Build Instructions

To lock the binary to your specific hardware and enable maximum speed:

# Set flags for your CPU
$env:RUSTFLAGS="-C target-cpu=native"

# Build the release binary
cargo build --release

Usage

# Copy a single file
./tcopy source.txt backup.txt

# Copy an entire folder recursively (Turbo Mode)
./tcopy ./node_modules ./backup_modules

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages