Compare commits

..

3 Commits

Author SHA1 Message Date
Jan Katzer
1f2deed43d Update makefile and README
Some checks failed
isspam build / build (push) Failing after 3m0s
2025-10-06 13:52:54 +02:00
Jan Katzer
9028293a85 Fix all warnings 2025-10-06 13:45:18 +02:00
Jan Katzer
f3ec3fdd36 Optimize 12bitfloat rust version 2025-10-06 13:39:29 +02:00
5 changed files with 1007 additions and 130 deletions

View File

@ -2,6 +2,17 @@
# It is not intended for manual editing.
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]]
name = "crossbeam-deque"
version = "0.8.5"
@ -33,6 +44,37 @@ version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
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]]
name = "rayon"
version = "1.10.0"
@ -57,5 +99,29 @@ dependencies = [
name = "risspam"
version = "0.1.0"
dependencies = [
"core_affinity",
"memmap2",
"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"

View File

@ -1,11 +1,19 @@
[package]
name = "risspam"
version = "0.1.0"
edition = "2021"
[dependencies]
rayon = "1.10.0"
edition = "2024"
[profile.release]
lto = "thin"
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

View File

@ -21,12 +21,14 @@ build_borded_cpp:
build_risspam:
@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:
@echo "compiling jest_rust project"
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_risspam: run_spam_risspam run_not_spam_risspam
@ -59,9 +61,14 @@ publish:
@./publish risspam
@rm publish
@rm env.py
benchmark:
-@rm -rf books
@echo "Extracting books."
@tar -xzf books.tar.gz books/
@echo "Extracted books."
@python bench.py
# Skip extracting books over and over
benchmark_only:
@python bench.py

View File

@ -1,21 +1,36 @@
# Isspam
# isspam
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
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
```
## 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
### Using files as parameter
```