Skip to content

Releases: mitiko/gallop

v0.1.1

14 Nov 17:11
Compare
Choose a tag to compare

Apparently Zig passes parameters by value..
I thought there existed a Zig to Rus mapping like: p(Self) -> p(&self), and p(*Self) -> p(&mut self)
but actually it's more like: p(Self) -> p(self.clone()), and p(*Self) -> p(&mut self)
I thought the big slowdown and many memcpy's were from the buffered io, so I wrote my own, but the result was the same. Tricky error.
Fixed now, and speed is much better without copying 4KiB on each bit.
Compression results are still the same, and v0.1.0 files are byte-for-byte equivalent.

Benchmarks on my computer:
(not very scientific, average of a couple)

metric book1 enwik8
size 370326 55960810
time 80ms 11s
speed 9.9 MiB/s 9.1 MiB/s
ratio 48.17% 55.96%
ns/byte 96 110
> (./gallop c /data/book1 book1.bin) && (./gallop d book1.bin book1.orig) && (cmp book1.orig /data/book1)
Compressed   768771 -> 370326 in 73.52 ms
Decompressed 370326 -> 768771 in 84.37 ms

> (./gallop c /data/enwik8 enwik8.bin) && (./gallop d enwik8.bin enwik8.orig) && (cmp enwik8.orig /data/enwik8)
Compressed   100000000 -> 55960810 in 10.50 sec
Decompressed 55960810 -> 100000000 in 11.60 sec

OS: Ubuntu 22.04.1 LTS
CPU: AMD Ryzen 5 5600G (6 cores),
Cache: 192KB dcache + 192KB icache L1 cache, 3MB L2 cache, 16MB L3 cache (shared)
Memory: 32GB:

  • 16GiB DDR4 Samsung M378A2G43AB3-CWE 3200 MHz (0.3 ns)
  • 16GiB DDR4 Kingston KF3200C16D4/16GX 2400 MHz (0.4 ns)

v0.1.0

13 Nov 15:07
Compare
Choose a tag to compare

Initial proof-of-concept executable.

Benchmarks on my computer:
(not very scientific, average of a couple)

metric book1 enwik8
size 370326 55960810
time 1.05s 133.39s
speed 715 KiB/s 732 KiB/s
ratio 48.17% 55.96%
ns/byte 1366 1330
> (./gallop c /data/book1 book1.bin) && (./gallop d book1.bin book1.orig) && (cmp book1.orig /data/book1)
Compressed   768771 -> 370326 in 1.05 sec
Decompressed 370326 -> 768771 in 1.05 sec

> (./gallop c /data/enwik8 enwik8.bin) && (./gallop d enwik8.bin enwik8.orig) && (cmp enwik8.orig /data/enwik8)
Compressed   100000000 -> 55960810 in 133.39 sec
Decompressed 55960810 -> 100000000 in 131.56 sec

OS: Ubuntu 22.04.1 LTS
CPU: AMD Ryzen 5 5600G (6 cores),
Cache: 192KB dcache + 192KB icache L1 cache, 3MB L2 cache, 16MB L3 cache (shared)
Memory: 32GB:

  • 16GiB DDR4 Samsung M378A2G43AB3-CWE 3200 MHz (0.3 ns)
  • 16GiB DDR4 Kingston KF3200C16D4/16GX 2400 MHz (0.4 ns)