Skip to content

Add compression and decompression benchmarks #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 18, 2020

Conversation

clue
Copy link
Owner

@clue clue commented Apr 18, 2020

@clue clue added this to the v0.2.2 milestone Apr 18, 2020
@clue
Copy link
Owner Author

clue commented Apr 18, 2020

For the reference, here's what the output looks like on my machine:

$ php examples/91-benchmark-compress.php
Compressed 1073741824 bytes in 5.9s => 180.6 MB/s

$ LANG=C dd if=/dev/zero bs=1M count=1k status=progress | gzip > /dev/null
888143872 bytes (888 MB, 847 MiB) copied, 4 s, 222 MB/s
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 4.83222 s, 222 MB/s
$ dd if=/dev/zero bs=1M count=1k status=none | gzip > null.gz
$ php examples/92-benchmark-decompress.php null.gz
Decompressed 1073741824 bytes in 3.4s => 314.8 MB/s

$ gunzip < null.gz | LANG=C dd of=/dev/zero status=progress
918094336 bytes (918 MB, 876 MiB) copied, 3 s, 306 MB/s
2097152+0 records in
2097152+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 3.50428 s, 306 MB/s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant