yeslogic / allsorts

Font parser, shaping engine, and subsetter implemented in Rust
https://yeslogic.com/blog/allsorts-rust-font-shaping-engine/
Apache License 2.0
706 stars 23 forks source link

Replace rental with self_cell #46

Closed Voultapher closed 3 years ago

Voultapher commented 3 years ago

Before:

$ cargo build ... 64 dependencies Finished dev [unoptimized + debuginfo] target(s) in 45.76s

After:

$ cargo build ... 54 dependencies Finished dev [unoptimized + debuginfo] target(s) in 25.65s

That's 78% faster in this very rough test. But the 10 fewer dependencies make this seem plausible, especially as this gets rid of building syn.

Disclaimer I'm the author of self_cell.

I ran cargo test and all non skipped tests passed before and after.

Note, rental is no longer maintained and ouroboros still carries the compile time cost of proc macros. Plus https://github.com/scpwiki/wikijump/pull/270#pullrequestreview-655216432 here they noticed a perf boost over ouroboros, I'd greatly appreciate if you could benchmark before and after and report your findings here.

Voultapher commented 3 years ago

Friendly ping what's the status of this?

wezm commented 3 years ago

Friendly ping what's the status of this?

Thank you very much for the contribution but we've decided to go with #47. self_cell looks interesting but ouroboros seems to have received more scrutiny and production use so we've decided to use it.