Compare commits
3 Commits
5fc6c839a1
...
1f2deed43d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f2deed43d | ||
|
|
9028293a85 | ||
|
|
f3ec3fdd36 |
66
12bitfloat_rust/risspam/Cargo.lock
generated
66
12bitfloat_rust/risspam/Cargo.lock
generated
@ -2,6 +2,17 @@
|
|||||||
# It is not intended for manual editing.
|
# It is not intended for manual editing.
|
||||||
version = 4
|
version = 4
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "core_affinity"
|
||||||
|
version = "0.8.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a034b3a7b624016c6e13f5df875747cc25f884156aad2abd12b6c46797971342"
|
||||||
|
dependencies = [
|
||||||
|
"libc",
|
||||||
|
"num_cpus",
|
||||||
|
"winapi",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "crossbeam-deque"
|
name = "crossbeam-deque"
|
||||||
version = "0.8.5"
|
version = "0.8.5"
|
||||||
@ -33,6 +44,37 @@ version = "1.13.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
|
checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "hermit-abi"
|
||||||
|
version = "0.5.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "libc"
|
||||||
|
version = "0.2.176"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "58f929b4d672ea937a23a1ab494143d968337a5f47e56d0815df1e0890ddf174"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "memmap2"
|
||||||
|
version = "0.9.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "843a98750cd611cc2965a8213b53b43e715f13c37a9e096c6408e69990961db7"
|
||||||
|
dependencies = [
|
||||||
|
"libc",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "num_cpus"
|
||||||
|
version = "1.17.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b"
|
||||||
|
dependencies = [
|
||||||
|
"hermit-abi",
|
||||||
|
"libc",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rayon"
|
name = "rayon"
|
||||||
version = "1.10.0"
|
version = "1.10.0"
|
||||||
@ -57,5 +99,29 @@ dependencies = [
|
|||||||
name = "risspam"
|
name = "risspam"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"core_affinity",
|
||||||
|
"memmap2",
|
||||||
"rayon",
|
"rayon",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "winapi"
|
||||||
|
version = "0.3.9"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
||||||
|
dependencies = [
|
||||||
|
"winapi-i686-pc-windows-gnu",
|
||||||
|
"winapi-x86_64-pc-windows-gnu",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "winapi-i686-pc-windows-gnu"
|
||||||
|
version = "0.4.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "winapi-x86_64-pc-windows-gnu"
|
||||||
|
version = "0.4.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||||
|
|||||||
@ -1,11 +1,19 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "risspam"
|
name = "risspam"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2024"
|
||||||
|
|
||||||
[dependencies]
|
|
||||||
rayon = "1.10.0"
|
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
lto = "thin"
|
lto = "thin"
|
||||||
panic = "abort"
|
panic = "abort"
|
||||||
|
codegen-units = 1
|
||||||
|
debug = "line-tables-only"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
rayon = "1.10.0"
|
||||||
|
memmap2 = "0.9.8"
|
||||||
|
core_affinity = "0.8.3"
|
||||||
|
#libc = "0.2.176"
|
||||||
|
#glommio = "0.9.0"
|
||||||
|
#monoio = "0.2.4"
|
||||||
|
#phf = { version = "0.13.1", features = ["macros"] }
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
9
Makefile
9
Makefile
@ -21,12 +21,14 @@ build_borded_cpp:
|
|||||||
|
|
||||||
build_risspam:
|
build_risspam:
|
||||||
@echo "Compiling 12bitfloat_risspam project."
|
@echo "Compiling 12bitfloat_risspam project."
|
||||||
cd 12bitfloat_rust/risspam && cargo run --release && cp target/release/risspam ../../
|
cd 12bitfloat_rust/risspam && cargo build --release && cp target/release/risspam ../../
|
||||||
|
|
||||||
build_jest:
|
build_jest:
|
||||||
@echo "compiling jest_rust project"
|
@echo "compiling jest_rust project"
|
||||||
cd jest_rust && cargo build --release && cp target/release/jisspam ..
|
cd jest_rust && cargo build --release && cp target/release/jisspam ..
|
||||||
|
|
||||||
|
build_all: build build_py build_cpp build_borded_cpp build_risspam build_jest
|
||||||
|
|
||||||
run: run_spam wl run_not_spam
|
run: run_spam wl run_not_spam
|
||||||
run_risspam: run_spam_risspam run_not_spam_risspam
|
run_risspam: run_spam_risspam run_not_spam_risspam
|
||||||
|
|
||||||
@ -59,9 +61,14 @@ publish:
|
|||||||
@./publish risspam
|
@./publish risspam
|
||||||
@rm publish
|
@rm publish
|
||||||
@rm env.py
|
@rm env.py
|
||||||
|
|
||||||
benchmark:
|
benchmark:
|
||||||
-@rm -rf books
|
-@rm -rf books
|
||||||
@echo "Extracting books."
|
@echo "Extracting books."
|
||||||
@tar -xzf books.tar.gz books/
|
@tar -xzf books.tar.gz books/
|
||||||
@echo "Extracted books."
|
@echo "Extracted books."
|
||||||
@python bench.py
|
@python bench.py
|
||||||
|
|
||||||
|
# Skip extracting books over and over
|
||||||
|
benchmark_only:
|
||||||
|
@python bench.py
|
||||||
|
|||||||
29
README.md
29
README.md
@ -1,21 +1,36 @@
|
|||||||
# Isspam
|
# isspam
|
||||||
Fast as light evaluator for text files to summarize specific details about the text files.
|
Fast as light evaluator for text files to summarize specific details about the text files.
|
||||||
|
|
||||||
This repository contains two versions of the same algorithm.
|
This repository contains multiple versions of the same(-ish) algorithm.
|
||||||
|
|
||||||
Versions:
|
## Versions
|
||||||
|
- C (isspam) written by **@retoor**
|
||||||
|
- Rust (risspam) written by **@12bitfloat**
|
||||||
|
- C++ (isspam_cpp) written by **@BordedDev**
|
||||||
|
- Rust (jisspam) written by **@jestdotty**
|
||||||
|
|
||||||
- Rust (risspam) written by 12bitfloat.
|
|
||||||
- C (isspam) written by retoor.
|
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
Build all versions to the repo root:
|
||||||
```
|
```
|
||||||
make build
|
make build_all
|
||||||
```
|
```
|
||||||
Build isspam with memory check (requires valgrind to be installed):
|
|
||||||
|
Build isspam (C) with memory check (requires valgrind to be installed):
|
||||||
```
|
```
|
||||||
make valgrind
|
make valgrind
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Benchmarking
|
||||||
|
After all binaries have been build to the repo root, you can benchmark them like this:
|
||||||
|
```
|
||||||
|
make benchmark
|
||||||
|
```
|
||||||
|
or without extracting books again:
|
||||||
|
```
|
||||||
|
make benchmark_only
|
||||||
|
```
|
||||||
|
|
||||||
## Running
|
## Running
|
||||||
### Using files as parameter
|
### Using files as parameter
|
||||||
```
|
```
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user