StractOrg / stract

web search done right
https://stract.com
GNU Affero General Public License v3.0
1.94k stars 43 forks source link

Remove all instances of `AsRef<Path>` to reduce the amount of generated code #113

Closed oeb25 closed 8 months ago

oeb25 commented 8 months ago

This reduces LLVM lines from 1335068 to 1227782, which is a 8% decrease!

Unfortunetly it does not (yet) yield any compile-time benefits. These are the results of incremental cargo build:

Branch Mean [s] Min [s] Max [s] Relative
main 8.119 ± 0.066 8.012 8.264 1.00 ± 0.01
purge 8.084 ± 0.054 8.016 8.182 1.00
Benchmarks are run using the following command: ```bash hyperfine --show-output -w 2 --export-markdown bench-compile-main-vs-purge.md \ -p "git switch main && touch core/src/lib.rs && sleep 1" -n "main" "cargo build" \ -p "git switch purge-as-ref-path && touch core/src/lib.rs && sleep 1" -n "purge" "cargo build" ```
oeb25 commented 8 months ago

I'll close this for now, since it does not provide much benefit.