Crates.io | china-id |
lib.rs | china-id |
version | 0.1.2 |
source | src |
created_at | 2023-10-15 15:20:42.382339 |
updated_at | 2023-11-07 05:27:18.489966 |
description | A tool that can verify the validity of Chinese identity card numbers |
homepage | |
repository | https://github.com/cuipeiyu/china-id |
max_upload_size | |
id | 1003900 |
size | 18,618 |
=======================
图片来源网络
Test Host Apple Mac mini 2023 M2 chip 16GB mem
golang
$ go test -benchmem -run=^$ -bench ^BenchmarkParse$
goos: darwin
goarch: arm64
pkg: github.com/cuipeiyu/china-id
BenchmarkParse-8 3918559 280.1 ns/op 24 B/op 1 allocs/op
PASS
ok github.com/cuipeiyu/china-id 1.733s
$ cargo bench
Compiling china-id v0.1.2 (/Users/cui/Projects/github.com/cuipeiyu/china-id)
Finished bench [optimized] target(s) in 0.95s
Running unittests src/lib.rs (target/release/deps/china_id-87f7b8907f156e71)
running 1 test
test tests::ut_parse ... ignored
test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running benches/benchmark.rs (target/release/deps/benchmark-6f5420af82dbb12b)
WARNING: HTML report generation will become a non-default optional feature in Criterion.rs 0.4.0.
This feature is being moved to cargo-criterion (https://github.com/bheisler/cargo-criterion) and will be optional in a future version of Criterion.rs. To silence this warning, either switch to cargo-criterion or enable the 'html_reports' feature in your Cargo.toml.
Gnuplot not found, using plotters backend
parse time: [404.83 ns 405.06 ns 405.32 ns]
change: [+32.779% +33.581% +34.605%] (p = 0.00 < 0.05)
Performance has regressed.
Found 11 outliers among 100 measurements (11.00%)
1 (1.00%) high mild
10 (10.00%) high severe