This program reads a large number of lines from a file. It then filters the items with the ones have 'a'. The time is measured for the filtering these items of ~18 Million.
Program | Go | Rust |
---|---|---|
filter-large-data | 115 ms | 53 ms |
Mac Mini M4 16GB
Go - 1.23 Rust - 1.82
the data files are avilable @ https://drive.google.com/open?id=0B6Tbo6PE8yPeVkFpd2ZXZU5yXzA
get all files under in the above link to ./data folder so the ./data folder should contain names.txt the data folder should be under the root of the project.
cd filter-large-data/gofilter go build -o target/ ./target/gofilter
cd filter-large-data/gofilter cargo build --release ./target/release/rustfilter