mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-22 15:41:48 +03:00
c7ddd679fd
### Benchmark `yarn workspace @affine/server-native bench` ``` ┌─────────┬────────────┬─────────┬────────────────────┬──────────┬─────────┐ │ (index) │ Task Name │ ops/sec │ Average Time (ns) │ Margin │ Samples │ ├─────────┼────────────┼─────────┼────────────────────┼──────────┼─────────┤ │ 0 │ 'tiktoken' │ '5' │ 176932518.76000002 │ '±4.71%' │ 100 │ │ 1 │ 'native' │ '16' │ 61041597.51000003 │ '±0.60%' │ 100 │ └─────────┴────────────┴─────────┴────────────────────┴──────────┴─────────┘ ```
33 lines
770 B
TOML
33 lines
770 B
TOML
[package]
|
|
name = "affine_server_native"
|
|
version = "1.0.0"
|
|
edition = "2021"
|
|
|
|
[lib]
|
|
crate-type = ["cdylib"]
|
|
|
|
[dependencies]
|
|
chrono = "0.4"
|
|
file-format = { version = "0.25", features = ["reader"] }
|
|
napi = { version = "2", default-features = false, features = [
|
|
"napi6",
|
|
"async",
|
|
] }
|
|
napi-derive = { version = "2", features = ["type-def"] }
|
|
rand = "0.8"
|
|
sha3 = "0.10"
|
|
tiktoken-rs = "0.5.9"
|
|
y-octo = { git = "https://github.com/y-crdt/y-octo.git", branch = "main" }
|
|
|
|
[target.'cfg(not(target_os = "linux"))'.dependencies]
|
|
mimalloc = { workspace = true }
|
|
|
|
[target.'cfg(all(target_os = "linux", not(target_arch = "arm")))'.dependencies]
|
|
mimalloc = { workspace = true, features = ["local_dynamic_tls"] }
|
|
|
|
[dev-dependencies]
|
|
tokio = "1"
|
|
|
|
[build-dependencies]
|
|
napi-build = "2"
|