DuskSystems / wayfind

A speedy, flexible router for Rust.
Apache License 2.0
7 stars 0 forks source link

Add check for valid UTF-8 post decoding #132

Closed CathalMullan closed 2 weeks ago

CathalMullan commented 2 weeks ago

Trying to minimize cost of UTF-8 checks. Can we do the single UTF-8 check upfront, and then not need to do any checks during parameter extraction?

EDIT: Looks like simdutf8 didn't boost performance locally or in CI.

codspeed-hq[bot] commented 2 weeks ago

CodSpeed Performance Report

Merging #132 will degrade performances by 5.1%

Comparing 124-try-and-break-unsafe-usage-in-parameter-extracting (d39ab56) with main (304f5ac)

Summary

❌ 1 (👁 1) regressions ✅ 15 untouched benchmarks

Benchmarks breakdown

Benchmark main 124-try-and-break-unsafe-usage-in-parameter-extracting Change
👁 path-tree benchmarks/wayfind 55.8 µs 58.8 µs -5.1%
codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 5.66038% with 50 lines in your changes missing coverage. Please review.

:white_check_mark: All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/errors/path.rs 0.00% 37 Missing :warning:
src/path.rs 22.22% 4 Missing and 3 partials :warning:
src/errors/insert.rs 0.00% 5 Missing :warning:
src/decode.rs 50.00% 1 Missing :warning:
Files with missing lines Coverage Δ
src/node/delete.rs 77.77% <ø> (ø)
src/node/insert.rs 91.63% <ø> (ø)
src/parts.rs 98.57% <ø> (ø)
src/router.rs 91.83% <ø> (ø)
src/decode.rs 78.12% <50.00%> (ø)
src/errors/insert.rs 76.47% <0.00%> (ø)
src/path.rs 47.36% <22.22%> (-16.27%) :arrow_down:
src/errors/path.rs 0.00% <0.00%> (ø)